Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 88eda5ecf7 | |||
| 807fcd8b07 | |||
| 512c999be0 | |||
| 70f3010529 | |||
| b836fbf5df | |||
| 3e4ac3bbd6 | |||
| 3e06412d7d | |||
| ae90109936 | |||
| a48cb4482c | |||
| 8b41603061 | |||
| 5486af7b63 | |||
| 58c80321c4 | |||
| 7664d46554 | |||
| e660032b42 | |||
| 5935f621cf | |||
| dd17b66484 | |||
| da52cd0884 | |||
| 9450f686a0 | |||
| 011ae90053 | |||
| 41f0224d6c | |||
| d89fd7e42a | |||
| 83eeb2504f | |||
| 92f7d9b773 | |||
| f7730c57ce | |||
| fb4be7bfcd | |||
| 1786e5d4d8 | |||
| 828da5502f | |||
| faf746bfc0 | |||
| f39d8904c3 | |||
| 8c6be948d0 | |||
| ddf0629eb8 | |||
| e7489dc6b7 | |||
| 14f1e18a00 | |||
| b1188bdc4c |
@@ -1,259 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.Collections.Specialized
|
|
||||||
Imports System.ComponentModel
|
|
||||||
Imports System.Windows
|
|
||||||
Imports System.Windows.Media
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class BTLFeatureVM
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Protected WithEvents m_BTLFeatureM As BTLFeatureM
|
|
||||||
Public ReadOnly Property BTLFeatureM As BTLFeatureM
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Protected m_BTLPartM As BTLPartM
|
|
||||||
|
|
||||||
Public ReadOnly Property nFeatureId As Integer
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.nFeatureId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Property nSelGRP As Integer
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.nSelGRP
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_BTLFeatureM.nSelGRP = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property sDescGRP As String
|
|
||||||
Get
|
|
||||||
Dim sDescConstruction As String = String.Empty
|
|
||||||
If CalcBeamPrivateProfileGRP(m_BTLFeatureM.nSelGRP) = 0 Then
|
|
||||||
sDescConstruction = "L"
|
|
||||||
Else
|
|
||||||
sDescConstruction = "T"
|
|
||||||
End If
|
|
||||||
sDescConstruction &= m_BTLFeatureM.nPRC.ToString("000")
|
|
||||||
Return sDescConstruction
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nPRC As Integer
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.nPRC
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_BTLFeatureM.nPRC = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' Lato
|
|
||||||
Public Overridable Property nSelSIDE As Integer
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.nSelSIDE
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_BTLFeatureM.nSelSIDE = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sName As String
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.sName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Property bDO As Boolean
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.bDO
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_BTLFeatureM.bDO = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nPRID As Integer
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.nPRID
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_BTLFeatureM.nPRID = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property sDES As String
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.sDES
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_BTLFeatureM.sDES = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property frFRAME As Frame3d
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.frFRAME
|
|
||||||
End Get
|
|
||||||
Set(value As Frame3d)
|
|
||||||
m_BTLFeatureM.frFRAME = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' proprieta' che mostra la descrizione in interfaccia
|
|
||||||
Public ReadOnly Property sDesc As String
|
|
||||||
Get
|
|
||||||
Return sDescGRP & " " & sName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nState As CalcStates
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.nState
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nCALC_ERR As Integer
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.nCALC_ERR
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nCALC_ROT As Integer
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.nCALC_ROT
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sCALC_MSG As String
|
|
||||||
Get
|
|
||||||
Return m_BTLFeatureM.sCALC_MSG
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property Calc_Background As SolidColorBrush
|
|
||||||
Get
|
|
||||||
If Not m_BTLFeatureM.bDO Then
|
|
||||||
Return Brushes.Aqua
|
|
||||||
ElseIf m_BTLFeatureM.nState = CalcStates.OK Then
|
|
||||||
Return Brushes.Green
|
|
||||||
ElseIf m_BTLFeatureM.nState = CalcStates.NOTCALCULATED Then
|
|
||||||
Return Brushes.LightGray
|
|
||||||
ElseIf m_BTLFeatureM.nState = CalcStates.INFO Then
|
|
||||||
Return Brushes.Green
|
|
||||||
ElseIf m_BTLFeatureM.nState = CalcStates.WARNING Then
|
|
||||||
Return Brushes.Orange
|
|
||||||
ElseIf m_BTLFeatureM.nState = CalcStates.ERROR_ Then
|
|
||||||
Return Brushes.Red
|
|
||||||
Else
|
|
||||||
Return Brushes.Red
|
|
||||||
End If
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return If(m_BTLFeatureM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_ERR_Letter As String
|
|
||||||
Get
|
|
||||||
Select Case m_BTLFeatureM.nCALC_ERR
|
|
||||||
Case 22
|
|
||||||
Return "c"
|
|
||||||
Case 19, 23, 24, 25
|
|
||||||
Return "e"
|
|
||||||
Case 17
|
|
||||||
Return "w"
|
|
||||||
Case < 0
|
|
||||||
Return "i"
|
|
||||||
Case Else
|
|
||||||
Return ""
|
|
||||||
End Select
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
|
||||||
Get
|
|
||||||
Select Case m_BTLFeatureM.nState
|
|
||||||
Case CalcStates.ERROR_
|
|
||||||
Return Brushes.Red
|
|
||||||
Case CalcStates.WARNING
|
|
||||||
Return Brushes.Orange
|
|
||||||
Case CalcStates.INFO
|
|
||||||
Return Brushes.Green
|
|
||||||
Case Else
|
|
||||||
Return Brushes.Red
|
|
||||||
End Select
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
|
||||||
|
|
||||||
'Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
|
|
||||||
' m_BTLFeatureM = BTLFeatureM
|
|
||||||
' AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
|
|
||||||
' AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded
|
|
||||||
' m_BTLPartM = BTLPartM
|
|
||||||
' CreatePBTLParamVMList()
|
|
||||||
' CreateQBTLParamVMList()
|
|
||||||
' NotifyPropertyChanged(NameOf(Calc_Background))
|
|
||||||
' NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
|
||||||
' NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
|
||||||
' NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Sub New()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Sub New(BTLFeatureM As BTLFeatureM)
|
|
||||||
m_BTLFeatureM = BTLFeatureM
|
|
||||||
m_BTLPartM = Nothing
|
|
||||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
' funzione che seleziona la feature nella geometria
|
|
||||||
Public Sub SelGeomFeature()
|
|
||||||
EgtDeselectAll()
|
|
||||||
SelGeomFeature(nFeatureId)
|
|
||||||
End Sub
|
|
||||||
Private Sub SelGeomFeature(nMyFeatureId As Integer)
|
|
||||||
EgtSelectObj(nMyFeatureId)
|
|
||||||
Dim sVal As String = ""
|
|
||||||
If EgtGetInfo(nMyFeatureId, BTL_FTR_ADJID, sVal) Then
|
|
||||||
Dim vAdjId() As String = sVal.Split(","c)
|
|
||||||
For Each sAdjId In vAdjId
|
|
||||||
Dim nAdjId As Integer
|
|
||||||
If Integer.TryParse(sAdjId, nAdjId) Then
|
|
||||||
SelGeomFeature(nMyFeatureId + nAdjId)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
If EgtGetInfo(nMyFeatureId, BTL_FTR_AUXID, sVal) Then
|
|
||||||
Dim vAuxId() As String = sVal.Split(","c)
|
|
||||||
For Each sAuxId In vAuxId
|
|
||||||
Dim nAuxId As Integer
|
|
||||||
If Integer.TryParse(sAuxId, nAuxId) Then
|
|
||||||
EgtSelectObj(nMyFeatureId + nAuxId)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,281 +1,400 @@
|
|||||||
Public Module ConstBeam
|
Public Module ConstBeam
|
||||||
|
|
||||||
Public Enum BTLParamType As Integer
|
Friend Const BTL_FTR_DES As String = "DES"
|
||||||
DOUBLE_ = 1
|
|
||||||
STRING_ = 2
|
|
||||||
COMBO = 3
|
|
||||||
LENGTH = 4
|
|
||||||
CHECKBOX = 5
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum BTLPartParam As Integer
|
Friend Const BTL_FTR_DO As String = "DO"
|
||||||
NULL = 0
|
|
||||||
PDN = 1
|
|
||||||
NAM = 2
|
|
||||||
GRP = 3
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum GRPType As Integer
|
Friend Const BTL_FTR_FRAME As String = "FRAME"
|
||||||
L = 0
|
|
||||||
T = 1
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Enum MachineType As Integer
|
Friend Const BTL_FTR_GRP As String = "GRP"
|
||||||
NULL = 0
|
|
||||||
BEAM = 1
|
|
||||||
WALL = 2
|
|
||||||
BOTH = 3
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Enum CalcStates As Integer
|
Friend Const BTL_FTR_MAINID As String = "MAINID"
|
||||||
NOTCALCULATED = -1
|
|
||||||
OK = 0
|
|
||||||
WARNING = 1
|
|
||||||
ERROR_ = 2
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum Range As Integer
|
Friend Const BTL_FTR_NAME As String = "NAME"
|
||||||
STANDARD = 1
|
|
||||||
EXTENDED = 2
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum PartOffset_RefSideFixClamp As Integer
|
Friend Const BTL_FTR_PRC As String = "PRC"
|
||||||
INACTIVE = 0
|
|
||||||
REFSIDE1 = 1
|
|
||||||
REFSIDE2 = 2
|
|
||||||
REFSIDE3 = 3
|
|
||||||
REFSIDE4 = 4
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum ProcessingQuality As Integer
|
Friend Const BTL_FTR_PRID As String = "PRID"
|
||||||
AUTOMATIC = 1
|
|
||||||
VISIBLE = 2
|
|
||||||
FAST = 3
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum Recess As Integer
|
Friend Const BTL_FTR_SIDE As String = "SIDE"
|
||||||
AUTOMATIC = 1
|
|
||||||
MANUAL = 2
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum StoreyType As Integer
|
Friend Const BTL_GEN_ARCHITECT = "ARCHITECT"
|
||||||
CEILING = 1
|
|
||||||
ROOF = 2
|
|
||||||
WALL = 3
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum AlignmentLocation As Integer
|
Friend Const BTL_GEN_COMPUTERNAME = "COMPUTERNAME"
|
||||||
INACTIV = 0
|
|
||||||
BR = 1
|
|
||||||
TR = 2
|
|
||||||
BA = 3
|
|
||||||
TA = 4
|
|
||||||
HC = 5
|
|
||||||
VC = 6
|
|
||||||
AC = 7
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum AlignmentEndtype As Integer
|
Friend Const BTL_GEN_CUSTOMER = "CUSTOMER"
|
||||||
R = 1
|
|
||||||
A = 2
|
|
||||||
D = 3
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum MaterialType As Integer
|
Friend Const BTL_GEN_DELIVDATE = "DELIVERYDATE"
|
||||||
INACTIV = 0
|
|
||||||
BA = 1
|
|
||||||
CL = 2
|
|
||||||
MT = 3
|
|
||||||
ME_ = 4
|
|
||||||
GB = 5
|
|
||||||
GF = 6
|
|
||||||
IN_ = 7
|
|
||||||
SH = 8
|
|
||||||
FB = 9
|
|
||||||
PB = 10
|
|
||||||
PL = 11
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Enum MoveDirections As Integer
|
Friend Const BTL_GEN_EDITOR = "EDITOR"
|
||||||
UP = -1
|
|
||||||
DOWN = 1
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Const BTLFEATURES_FILE_NAME As String = "BTLFeatures.ini"
|
Friend Const BTL_GEN_EXPDATE = "EXPORTDATE"
|
||||||
|
|
||||||
'Public Const S_GENERAL As String = "General"
|
Friend Const BTL_GEN_EXPFILE = "EXPORTFILE"
|
||||||
'Public Const K_DEBUG As String = "Debug"
|
|
||||||
|
|
||||||
' Tipo di progetto
|
Friend Const BTL_GEN_EXPRELEASE = "EXPORTRELEASE"
|
||||||
Public Enum ProjectType As Integer
|
|
||||||
PROJ = 1
|
|
||||||
PROD = 2
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
' Tipo di progetto (Beam o Wall)
|
Friend Const BTL_GEN_EXPTIME = "EXPORTTIME"
|
||||||
Public Enum BWType As Integer
|
|
||||||
BEAM = 1
|
|
||||||
WALL = 2
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Friend Const PROJ As String = "PROJ"
|
Friend Const BTL_GEN_LANGUAGE = "LANGUAGE"
|
||||||
Friend Const FILENAMESEPARATOR As Char = "^"c
|
|
||||||
Friend Const BTLINFO As String = "BtlInfo"
|
|
||||||
|
|
||||||
' info parametri BTL
|
Friend Const BTL_GEN_LISTNAME = "LISTNAME"
|
||||||
Friend Const BTL_PRT_PROJ As String = "PROJ"
|
|
||||||
Friend Const BTL_PRT_PDN As String = "PDN"
|
|
||||||
Friend Const BTL_PRT_DO As String = "DO"
|
|
||||||
Friend Const BTL_PRT_NAM As String = "NAM"
|
|
||||||
Friend Const BTL_PRT_L As String = "L"
|
|
||||||
Friend Const BTL_PRT_W As String = "W"
|
|
||||||
Friend Const BTL_PRT_H As String = "H"
|
|
||||||
Friend Const BTL_PRT_CNT As String = "CNT"
|
|
||||||
Friend Const BTL_PRT_ADDED As String = "ADDED"
|
|
||||||
Friend Const BTL_PRT_DONE As String = "DONE"
|
|
||||||
Friend Const BTL_PRT_ROTATED As String = "ROTATED"
|
|
||||||
Friend Const BTL_PRT_INVERTED As String = "INVERTED"
|
|
||||||
Friend Const BTL_PRT_MATERIAL As String = "MATERIAL"
|
|
||||||
' parametri pezzo
|
|
||||||
Friend Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
|
|
||||||
Friend Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
|
|
||||||
Friend Const BTL_PRT_ORDERNUM = "ORDERNUMBER"
|
|
||||||
Friend Const BTL_PRT_DESIGNATION = "DESIGNATION"
|
|
||||||
Friend Const BTL_PRT_ANNOTATION = "ANNOTATION"
|
|
||||||
Friend Const BTL_PRT_STOREY = "STOREY"
|
|
||||||
Friend Const BTL_PRT_GROUP = "GROUP"
|
|
||||||
Friend Const BTL_PRT_PACKAGE = "PACKAGE"
|
|
||||||
Friend Const BTL_PRT_TIMBERGRADE = "TIMBERGRADE"
|
|
||||||
Friend Const BTL_PRT_QUALITYGRADE = "QUALITYGRADE"
|
|
||||||
Friend Const BTL_PRT_COLOUR = "COLOUR"
|
|
||||||
Friend Const BTL_PRT_PLANINGLENGTH = "PLANINGLENGTH"
|
|
||||||
Friend Const BTL_PRT_STARTOFFSET = "STARTOFFSET"
|
|
||||||
Friend Const BTL_PRT_ENDOFFSET = "ENDOFFSET"
|
|
||||||
Friend Const BTL_PRT_UID = "UID"
|
|
||||||
Friend Const BTL_PRT_TRANSFORMATION = "TRANSFORMATION"
|
|
||||||
Friend Const BTL_PRT_CAMBER = "CAMBER"
|
|
||||||
Friend Const BTL_PRT_PARTOFFSET = "PARTOFFSET"
|
|
||||||
Friend Const BTL_PRT_PROCESSINGQUALITY = "PROCESSINGQUALITY"
|
|
||||||
Friend Const BTL_PRT_RECESS = "RECESS"
|
|
||||||
Friend Const BTL_PRT_STOREYTYPE = "STOREYTYPE"
|
|
||||||
Friend Const BTL_PRT_ELEMENTNUM = "ELEMENTNUMBER"
|
|
||||||
Friend Const BTL_PRT_LAYER = "LAYER"
|
|
||||||
Friend Const BTL_PRT_MODULENUM = "MODULENUMBER"
|
|
||||||
'Friend Const BTL_PRT_USERATTRIBUTE = "USERATTRIBUTE"
|
|
||||||
Friend Const BTL_PRT_COMMENT = "COMMENT"
|
|
||||||
Friend Const BTL_PRT_GRAINDIR = "GRAINDIRECTION"
|
|
||||||
Friend Const BTL_PRT_REFSIDE = "REFERENCESIDE"
|
|
||||||
Friend Const BTL_PRT_ALIGNMENT = "ALIGNMENT"
|
|
||||||
Friend Const BTL_PRT_MATERIALTYPE = "MATERIALTYPE"
|
|
||||||
|
|
||||||
' parametri generici
|
Friend Const BTL_GEN_PROJGUID = "PROJECTGUID"
|
||||||
Friend Const BTL_GEN_PROJNUM = "PROJECTNUMBER"
|
|
||||||
Friend Const BTL_GEN_PROJNAME = "PROJECTNAME"
|
|
||||||
Friend Const BTL_GEN_PROJPART = "PROJECTPART"
|
|
||||||
Friend Const BTL_GEN_PROJGUID = "PROJECTGUID"
|
|
||||||
Friend Const BTL_GEN_PROJTYPE = "PROJECTTYPE"
|
|
||||||
Friend Const BTL_GEN_LISTNAME = "LISTNAME"
|
|
||||||
Friend Const BTL_GEN_CUSTOMER = "CUSTOMER"
|
|
||||||
Friend Const BTL_GEN_ARCHITECT = "ARCHITECT"
|
|
||||||
Friend Const BTL_GEN_EDITOR = "EDITOR"
|
|
||||||
Friend Const BTL_GEN_DELIVDATE = "DELIVERYDATE"
|
|
||||||
Friend Const BTL_GEN_EXPDATE = "EXPORTDATE"
|
|
||||||
Friend Const BTL_GEN_EXPTIME = "EXPORTTIME"
|
|
||||||
Friend Const BTL_GEN_EXPRELEASE = "EXPORTRELEASE"
|
|
||||||
Friend Const BTL_GEN_LANGUAGE = "LANGUAGE"
|
|
||||||
Friend Const BTL_GEN_RANGE = "RANGE"
|
|
||||||
Friend Const BTL_GEN_COMPUTERNAME = "COMPUTERNAME"
|
|
||||||
Friend Const BTL_GEN_USER = "USER"
|
|
||||||
Friend Const BTL_GEN_SRCFILE = "SOURCEFILE"
|
|
||||||
Friend Const BTL_GEN_EXPFILE = "EXPORTFILE"
|
|
||||||
Friend Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE"
|
|
||||||
|
|
||||||
Friend Const PROCESSINGS As String = "Processings"
|
Friend Const BTL_GEN_PROJNAME = "PROJECTNAME"
|
||||||
Friend Const OUTLINE As String = "Outline"
|
|
||||||
Friend Const BTL_FTR_GRP As String = "GRP"
|
|
||||||
Friend Const BTL_FTR_PRC As String = "PRC"
|
|
||||||
Friend Const BTL_FTR_DO As String = "DO"
|
|
||||||
Friend Const BTL_FTR_SIDE As String = "SIDE"
|
|
||||||
Friend Const BTL_FTR_NAME As String = "NAME"
|
|
||||||
Friend Const BTL_FTR_DES As String = "DES"
|
|
||||||
Friend Const BTL_FTR_PRID As String = "PRID"
|
|
||||||
Friend Const BTL_FTR_FRAME As String = "FRAME"
|
|
||||||
Friend Const BTL_FTR_MAINID As String = "MAINID"
|
|
||||||
Friend Const BTL_FTR_ADJID As String = "ADJID"
|
|
||||||
Friend Const BTL_FTR_AUXID As String = "AUXID"
|
|
||||||
|
|
||||||
' parametri machgroup grezzi
|
' parametri generici
|
||||||
Friend Const MGR_RPT_ID As String = "ID"
|
Friend Const BTL_GEN_PROJNUM = "PROJECTNUMBER"
|
||||||
Friend Const MGR_RPT_L As String = "L"
|
|
||||||
Friend Const MGR_RPT_W As String = "W"
|
|
||||||
Friend Const MGR_RPT_H As String = "H"
|
|
||||||
Friend Const MGR_RPT_WASTE As String = "WASTE"
|
|
||||||
Friend Const MGR_RPT_USAGE As String = "USAGE"
|
|
||||||
Friend Const MGR_RPT_STARTCUT As String = "STARTCUT"
|
|
||||||
Friend Const MGR_RPT_MATERIAL As String = "MATERIAL"
|
|
||||||
|
|
||||||
Friend Const MGR_PRT_PDN As String = "PDN"
|
Friend Const BTL_GEN_PROJPART = "PROJECTPART"
|
||||||
Friend Const MGR_PRT_L As String = "L"
|
|
||||||
Friend Const MGR_PRT_W As String = "W"
|
|
||||||
Friend Const MGR_PRT_H As String = "H"
|
|
||||||
Friend Const MGR_PRT_DES As String = "DES"
|
|
||||||
Friend Const MGR_PRT_STARTCUT As String = "STARTCUT"
|
|
||||||
Friend Const MGR_PRT_MATERIAL As String = "MATERIAL"
|
|
||||||
Friend Const MGR_PRT_ROT As String = "ROT"
|
|
||||||
Friend Const MGR_PRT_FLIP As String = "FLIP"
|
|
||||||
Friend Const MGR_PRT_POSX As String = "POSX"
|
|
||||||
Friend Const MGR_PRT_POSY As String = "POSY"
|
|
||||||
|
|
||||||
Friend Const MGR_FTR_GRP As String = "GRP"
|
Friend Const BTL_GEN_PROJTYPE = "PROJECTTYPE"
|
||||||
Friend Const MGR_FTR_PRC As String = "PRC"
|
|
||||||
Friend Const MGR_FTR_DO As String = "DO"
|
|
||||||
Friend Const MGR_FTR_SIDE As String = "SIDE"
|
|
||||||
Friend Const MGR_FTR_NAME As String = "NAME"
|
|
||||||
Friend Const MGR_FTR_DES As String = "DES"
|
|
||||||
Friend Const MGR_FTR_PRID As String = "PRID"
|
|
||||||
Friend Const MGR_FTR_FRAME As String = "FRAME"
|
|
||||||
|
|
||||||
' parametri creazione barre
|
Friend Const BTL_GEN_RANGE = "RANGE"
|
||||||
Friend Const MGR_RPT_BARLEN As String = "BARLEN"
|
|
||||||
Friend Const MGR_RPT_BARHEIGHT As String = "BARHEIGHT"
|
|
||||||
Friend Const MGR_RPT_BARWIDTH As String = "BARWIDTH"
|
|
||||||
Friend Const MGR_RPT_PANELLEN As String = "PANELLEN"
|
|
||||||
Friend Const MGR_RPT_PANELWIDTH As String = "PANELWIDTH"
|
|
||||||
Friend Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT"
|
|
||||||
Friend Const MGR_RPT_PART As String = "PART"
|
|
||||||
|
|
||||||
' parametri errori integration
|
Friend Const BTL_GEN_SRCFILE = "SOURCEFILE"
|
||||||
Friend Const ITG_CUTID As String = "CUTID"
|
|
||||||
Friend Const ITG_TASKID As String = "TASKID"
|
|
||||||
Friend Const ITG_PROJ_ERR As String = "PROJ_ERR"
|
|
||||||
Friend Const ITG_PROJ_MSG As String = "PROJ_MSG"
|
|
||||||
Friend Const ITG_PROJ_ROT As String = "PROJ_ROT"
|
|
||||||
Friend Const ITG_PROJ_FALL As String = "PROJ_FALL"
|
|
||||||
Friend Const ITG_PROJ_TIME As String = "PROJ_TIME"
|
|
||||||
|
|
||||||
' parametri errori integration
|
Friend Const BTL_GEN_USER = "USER"
|
||||||
Friend Const ITG_PROD_ERR As String = "PROD_ERR"
|
|
||||||
Friend Const ITG_PROD_MSG As String = "PROD_MSG"
|
|
||||||
Friend Const ITG_PROD_ROT As String = "PROD_ROT"
|
|
||||||
Friend Const ITG_PROD_FALL As String = "PROD_FALL"
|
|
||||||
Friend Const ITG_PROD_TIME As String = "PROD_TIME"
|
|
||||||
|
|
||||||
' parametri errori integration
|
Friend Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE"
|
||||||
Friend Const DUPLO_TODELETE As String = "DUPLO_TODELETE"
|
|
||||||
|
|
||||||
' parametri warehouse
|
Friend Const BTL_PRT_ADDED As String = "ADDED"
|
||||||
Friend Const WRH_BEAM As String = "BEAM"
|
|
||||||
Friend Const WRH_WALL As String = "WALL"
|
|
||||||
Friend Const WRH_CURRENT As String = "Current"
|
|
||||||
Friend Const WRH_STARTOFFSET As String = "StartOffset"
|
|
||||||
Friend Const WRH_OFFSET As String = "Offset"
|
|
||||||
Friend Const WRH_L As String = "L"
|
|
||||||
Friend Const WRH_KERF As String = "Kerf"
|
|
||||||
Friend Const WRH_S As String = "S"
|
|
||||||
|
|
||||||
' parametri import/export
|
Friend Const BTL_PRT_ALIGNMENT = "ALIGNMENT"
|
||||||
Public Const EXP_PROJ As String = "EXPORTPROJ"
|
|
||||||
Public Const EXP_PROD As String = "EXPORTPROD"
|
|
||||||
Public Const BTLFILENAME As String = "BTLFILENAME"
|
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_ANNOTATION = "ANNOTATION"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_CAMBER = "CAMBER"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_CNT As String = "CNT"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_COLOUR = "COLOUR"
|
||||||
|
|
||||||
|
'Friend Const BTL_PRT_USERATTRIBUTE = "USERATTRIBUTE"
|
||||||
|
Friend Const BTL_PRT_COMMENT = "COMMENT"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_DESIGNATION = "DESIGNATION"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_DO As String = "DO"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_DONE As String = "DONE"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_ELEMENTNUM = "ELEMENTNUMBER"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_ENDOFFSET = "ENDOFFSET"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_GRAINDIR = "GRAINDIRECTION"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_GROUP = "GROUP"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_H As String = "H"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_INVERTED As String = "INVERTED"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_L As String = "L"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_LAYER = "LAYER"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_MATERIAL As String = "MATERIAL"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_MATERIALTYPE = "MATERIALTYPE"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_MODULENUM = "MODULENUMBER"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_NAM As String = "NAM"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_ORDERNUM = "ORDERNUMBER"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_PACKAGE = "PACKAGE"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_PARTOFFSET = "PARTOFFSET"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_PDN As String = "PDN"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_PLANINGLENGTH = "PLANINGLENGTH"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_PROCESSINGQUALITY = "PROCESSINGQUALITY"
|
||||||
|
|
||||||
|
' info parametri BTL
|
||||||
|
Friend Const BTL_PRT_PROJ As String = "PROJ"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_QUALITYGRADE = "QUALITYGRADE"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_RECESS = "RECESS"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_REFSIDE = "REFERENCESIDE"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_ROTATED As String = "ROTATED"
|
||||||
|
|
||||||
|
' parametri pezzo
|
||||||
|
Friend Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_STARTOFFSET = "STARTOFFSET"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_STOREY = "STOREY"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_STOREYTYPE = "STOREYTYPE"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_TIMBERGRADE = "TIMBERGRADE"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_TRANSFORMATION = "TRANSFORMATION"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_UID = "UID"
|
||||||
|
|
||||||
|
Friend Const BTL_PRT_W As String = "W"
|
||||||
|
|
||||||
|
Friend Const BTLINFO As String = "BtlInfo"
|
||||||
|
|
||||||
|
' parametri errori integration
|
||||||
|
Friend Const DUPLO_TODELETE As String = "DUPLO_TODELETE"
|
||||||
|
|
||||||
|
Friend Const FILENAMESEPARATOR As Char = "^"c
|
||||||
|
|
||||||
|
' parametri errori integration
|
||||||
|
Friend Const ITG_CUTID As String = "CUTID"
|
||||||
|
|
||||||
|
' parametri errori integration
|
||||||
|
Friend Const ITG_PROD_ERR As String = "PROD_ERR"
|
||||||
|
|
||||||
|
Friend Const ITG_PROD_FALL As String = "PROD_FALL"
|
||||||
|
|
||||||
|
Friend Const ITG_PROD_MSG As String = "PROD_MSG"
|
||||||
|
|
||||||
|
Friend Const ITG_PROD_ROT As String = "PROD_ROT"
|
||||||
|
|
||||||
|
Friend Const ITG_PROD_TIME As String = "PROD_TIME"
|
||||||
|
|
||||||
|
Friend Const ITG_PROJ_ERR As String = "PROJ_ERR"
|
||||||
|
|
||||||
|
Friend Const ITG_PROJ_FALL As String = "PROJ_FALL"
|
||||||
|
|
||||||
|
Friend Const ITG_PROJ_MSG As String = "PROJ_MSG"
|
||||||
|
|
||||||
|
Friend Const ITG_PROJ_ROT As String = "PROJ_ROT"
|
||||||
|
|
||||||
|
Friend Const ITG_PROJ_TIME As String = "PROJ_TIME"
|
||||||
|
|
||||||
|
Friend Const ITG_TASKID As String = "TASKID"
|
||||||
|
|
||||||
|
Friend Const MGR_FTR_DES As String = "DES"
|
||||||
|
|
||||||
|
Friend Const MGR_FTR_DO As String = "DO"
|
||||||
|
|
||||||
|
Friend Const MGR_FTR_FRAME As String = "FRAME"
|
||||||
|
|
||||||
|
Friend Const MGR_FTR_GRP As String = "GRP"
|
||||||
|
|
||||||
|
Friend Const MGR_FTR_NAME As String = "NAME"
|
||||||
|
|
||||||
|
Friend Const MGR_FTR_PRC As String = "PRC"
|
||||||
|
|
||||||
|
Friend Const MGR_FTR_PRID As String = "PRID"
|
||||||
|
|
||||||
|
Friend Const MGR_FTR_SIDE As String = "SIDE"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_DES As String = "DES"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_FLIP As String = "FLIP"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_H As String = "H"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_L As String = "L"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_MATERIAL As String = "MATERIAL"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_PDN As String = "PDN"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_POSX As String = "POSX"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_POSY As String = "POSY"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_ROT As String = "ROT"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_STARTCUT As String = "STARTCUT"
|
||||||
|
|
||||||
|
Friend Const MGR_PRT_W As String = "W"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_BARHEIGHT As String = "BARHEIGHT"
|
||||||
|
|
||||||
|
' parametri creazione barre
|
||||||
|
Friend Const MGR_RPT_BARLEN As String = "BARLEN"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_BARWIDTH As String = "BARWIDTH"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_H As String = "H"
|
||||||
|
|
||||||
|
' parametri machgroup grezzi
|
||||||
|
Friend Const MGR_RPT_ID As String = "ID"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_L As String = "L"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_MATERIAL As String = "MATERIAL"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_PANELLEN As String = "PANELLEN"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_PANELWIDTH As String = "PANELWIDTH"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_PART As String = "PART"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_STARTCUT As String = "STARTCUT"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_USAGE As String = "USAGE"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_W As String = "W"
|
||||||
|
|
||||||
|
Friend Const MGR_RPT_WASTE As String = "WASTE"
|
||||||
|
|
||||||
|
Friend Const OUTLINE As String = "Outline"
|
||||||
|
|
||||||
|
Friend Const PROCESSINGS As String = "Processings"
|
||||||
|
|
||||||
|
Friend Const PROJ As String = "PROJ"
|
||||||
|
|
||||||
|
' parametri warehouse
|
||||||
|
Friend Const WRH_BEAM As String = "BEAM"
|
||||||
|
|
||||||
|
Friend Const WRH_CURRENT As String = "Current"
|
||||||
|
|
||||||
|
Friend Const WRH_KERF As String = "Kerf"
|
||||||
|
|
||||||
|
Friend Const WRH_L As String = "L"
|
||||||
|
|
||||||
|
Friend Const WRH_OFFSET As String = "Offset"
|
||||||
|
|
||||||
|
Friend Const WRH_S As String = "S"
|
||||||
|
|
||||||
|
Friend Const WRH_STARTOFFSET As String = "StartOffset"
|
||||||
|
|
||||||
|
Friend Const WRH_WALL As String = "WALL"
|
||||||
|
|
||||||
|
Public Const BTLFEATURES_FILE_NAME As String = "BTLFeatures.ini"
|
||||||
|
|
||||||
|
Public Const BTLFILENAME As String = "BTLFILENAME"
|
||||||
|
|
||||||
|
Public Const EXP_PROD As String = "EXPORTPROD"
|
||||||
|
|
||||||
|
' parametri import/export
|
||||||
|
Public Const EXP_PROJ As String = "EXPORTPROJ"
|
||||||
|
|
||||||
|
Public Enum AlignmentEndtype As Integer
|
||||||
|
R = 1
|
||||||
|
A = 2
|
||||||
|
D = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum AlignmentLocation As Integer
|
||||||
|
INACTIV = 0
|
||||||
|
BR = 1
|
||||||
|
TR = 2
|
||||||
|
BA = 3
|
||||||
|
TA = 4
|
||||||
|
HC = 5
|
||||||
|
VC = 6
|
||||||
|
AC = 7
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum BTLParamType As Integer
|
||||||
|
DOUBLE_ = 1
|
||||||
|
STRING_ = 2
|
||||||
|
COMBO = 3
|
||||||
|
LENGTH = 4
|
||||||
|
CHECKBOX = 5
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum BTLPartParam As Integer
|
||||||
|
NULL = 0
|
||||||
|
PDN = 1
|
||||||
|
NAM = 2
|
||||||
|
GRP = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' Tipo di progetto (Beam o Wall)
|
||||||
|
Public Enum BWType As Integer
|
||||||
|
NULL = 0
|
||||||
|
BEAM = 1
|
||||||
|
WALL = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Enum CalcStates As Integer
|
||||||
|
NOTCALCULATED = -1
|
||||||
|
OK = 0
|
||||||
|
WARNING = 1
|
||||||
|
ERROR_ = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum GRPType As Integer
|
||||||
|
L = 0
|
||||||
|
T = 1
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Enum MachineType As Integer
|
||||||
|
NULL = 0
|
||||||
|
BEAM = 1
|
||||||
|
WALL = 2
|
||||||
|
BOTH = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum MaterialType As Integer
|
||||||
|
INACTIV = 0
|
||||||
|
BA = 1
|
||||||
|
CL = 2
|
||||||
|
MT = 3
|
||||||
|
ME_ = 4
|
||||||
|
GB = 5
|
||||||
|
GF = 6
|
||||||
|
IN_ = 7
|
||||||
|
SH = 8
|
||||||
|
FB = 9
|
||||||
|
PB = 10
|
||||||
|
PL = 11
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum MoveDirections As Integer
|
||||||
|
UP = -1
|
||||||
|
DOWN = 1
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum PartOffset_RefSideFixClamp As Integer
|
||||||
|
INACTIVE = 0
|
||||||
|
REFSIDE1 = 1
|
||||||
|
REFSIDE2 = 2
|
||||||
|
REFSIDE3 = 3
|
||||||
|
REFSIDE4 = 4
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum ProcessingQuality As Integer
|
||||||
|
AUTOMATIC = 1
|
||||||
|
VISIBLE = 2
|
||||||
|
FAST = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
' Tipo di progetto
|
||||||
|
Public Enum ProjectType As Integer
|
||||||
|
PROJ = 1
|
||||||
|
PROD = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum Range As Integer
|
||||||
|
STANDARD = 1
|
||||||
|
EXTENDED = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum Recess As Integer
|
||||||
|
AUTOMATIC = 1
|
||||||
|
MANUAL = 2
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum StoreyType As Integer
|
||||||
|
CEILING = 1
|
||||||
|
ROOF = 2
|
||||||
|
WALL = 3
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
'Public Const S_GENERAL As String = "General"
|
||||||
|
'Public Const K_DEBUG As String = "Debug"
|
||||||
End Module
|
End Module
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
Public Module ConstDataGridColumnsIni
|
|
||||||
|
|
||||||
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.ini"
|
|
||||||
|
|
||||||
Public Const S_FEATURELIST As String = "DG_FeatureList"
|
|
||||||
Public Const S_OPENPROJFILEDLG_PROJ As String = "DG_OpenProjectFileDialog_PROJ"
|
|
||||||
Public Const S_OPENPROJFILEDLG_PROD As String = "DG_OpenProjectFileDialog_PROD"
|
|
||||||
Public Const S_RAWPARTLIST_BEAM As String = "DG_RawPartList_BEAM"
|
|
||||||
Public Const S_RAWPARTLIST_WALL As String = "DG_RawPartList_WALL"
|
|
||||||
Public Const S_PARTINRAWPARTLIST_BEAM As String = "DG_PartInRawPartList_BEAM"
|
|
||||||
Public Const S_PARTINRAWPARTLIST_WALL As String = "DG_PartInRawPartList_WALL"
|
|
||||||
|
|
||||||
End Module
|
|
||||||
@@ -10,9 +10,8 @@
|
|||||||
<AssemblyName>EgtBEAMWALL.Core</AssemblyName>
|
<AssemblyName>EgtBEAMWALL.Core</AssemblyName>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<MyType>Windows</MyType>
|
<MyType>Windows</MyType>
|
||||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<Deterministic>true</Deterministic>
|
<Deterministic>true</Deterministic>
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@@ -22,7 +21,6 @@
|
|||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DocumentationFile>EgtBEAMWALL.Core.xml</DocumentationFile>
|
<DocumentationFile>EgtBEAMWALL.Core.xml</DocumentationFile>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
@@ -32,7 +30,6 @@
|
|||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DocumentationFile>EgtBEAMWALL.Core.xml</DocumentationFile>
|
<DocumentationFile>EgtBEAMWALL.Core.xml</DocumentationFile>
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OptionExplicit>On</OptionExplicit>
|
<OptionExplicit>On</OptionExplicit>
|
||||||
@@ -59,8 +56,6 @@
|
|||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
@@ -79,14 +74,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="BeamM.vb" />
|
<Compile Include="BeamM.vb" />
|
||||||
<Compile Include="BTL ViewModel\BTLFeatureVM.vb" />
|
|
||||||
<Compile Include="Constants\ConstColumns.vb" />
|
<Compile Include="Constants\ConstColumns.vb" />
|
||||||
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
|
|
||||||
<Compile Include="Constants\ConstMachComm.vb" />
|
<Compile Include="Constants\ConstMachComm.vb" />
|
||||||
<Compile Include="EgtDataGrid\EgtDataGrid.xaml.vb">
|
|
||||||
<DependentUpon>EgtDataGrid.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="EgtDataGrid\DataGridColumnsIniFile.vb" />
|
|
||||||
<Compile Include="MachGroup Model\BeamMachGroupM.vb" />
|
<Compile Include="MachGroup Model\BeamMachGroupM.vb" />
|
||||||
<Compile Include="DataAccess\PartAddedEventArgs.vb" />
|
<Compile Include="DataAccess\PartAddedEventArgs.vb" />
|
||||||
<Compile Include="DataAccess\BTLParamAddedEventArgs.vb" />
|
<Compile Include="DataAccess\BTLParamAddedEventArgs.vb" />
|
||||||
@@ -101,19 +90,11 @@
|
|||||||
<Compile Include="BTL Model\BTLStructureM.vb" />
|
<Compile Include="BTL Model\BTLStructureM.vb" />
|
||||||
<Compile Include="Constants\ConstBeam.vb" />
|
<Compile Include="Constants\ConstBeam.vb" />
|
||||||
<Compile Include="Enum.vb" />
|
<Compile Include="Enum.vb" />
|
||||||
<Compile Include="MachGroupPanel\BeamMachGroupVM.vb" />
|
|
||||||
<Compile Include="MachGroupPanel\BeamVM.vb" />
|
|
||||||
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
|
||||||
<Compile Include="MachGroupPanel\MyMachGroupVM.vb" />
|
|
||||||
<Compile Include="MachGroupPanel\PartVM.vb" />
|
|
||||||
<Compile Include="MachGroupPanel\WallMachGroupVM.vb" />
|
|
||||||
<Compile Include="MachGroupPanel\WallVM.vb" />
|
|
||||||
<Compile Include="MachLog.vb" />
|
<Compile Include="MachLog.vb" />
|
||||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
<Compile Include="My Project\Application.Designer.vb">
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Application.myapp</DependentUpon>
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="My Project\Resources.Designer.vb">
|
<Compile Include="My Project\Resources.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
@@ -130,21 +111,13 @@
|
|||||||
<Compile Include="Lib\MachGroupPanelM.vb" />
|
<Compile Include="Lib\MachGroupPanelM.vb" />
|
||||||
<Compile Include="MachGroup Model\MyMachGroupPanelM.vb" />
|
<Compile Include="MachGroup Model\MyMachGroupPanelM.vb" />
|
||||||
<Compile Include="MyMachine.vb" />
|
<Compile Include="MyMachine.vb" />
|
||||||
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml.vb">
|
|
||||||
<DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogVM.vb" />
|
|
||||||
<Compile Include="PartM.vb" />
|
<Compile Include="PartM.vb" />
|
||||||
<Compile Include="ProdFileM.vb" />
|
<Compile Include="ProdFileM.vb" />
|
||||||
<Compile Include="ProjectFileM.vb" />
|
<Compile Include="ProjectFileM.vb" />
|
||||||
<Compile Include="ProjectManager\ProdFileVM.vb" />
|
|
||||||
<Compile Include="ProjectManager\ProjectFileVM.vb" />
|
|
||||||
<Compile Include="ProjectManager\ProjFileVM.vb" />
|
|
||||||
<Compile Include="ProjFileM.vb" />
|
<Compile Include="ProjFileM.vb" />
|
||||||
<Compile Include="SectionXMaterial.vb" />
|
<Compile Include="SectionXMaterial.vb" />
|
||||||
<Compile Include="Utility\BTLIniFile.vb" />
|
<Compile Include="Utility\BTLIniFile.vb" />
|
||||||
<Compile Include="Utility\Command.vb" />
|
<Compile Include="Utility\Command.vb" />
|
||||||
<Compile Include="Utility\CoreMap.vb" />
|
|
||||||
<Compile Include="Utility\VMBase.vb" />
|
<Compile Include="Utility\VMBase.vb" />
|
||||||
<Compile Include="WallM.vb" />
|
<Compile Include="WallM.vb" />
|
||||||
<Compile Include="WallMachGroupM.vb" />
|
<Compile Include="WallMachGroupM.vb" />
|
||||||
@@ -168,18 +141,8 @@
|
|||||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="EgtDataGrid\EgtDataGrid.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.Core.dll</PostBuildEvent>
|
<!-- <PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.Core.dll</PostBuildEvent> -->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.Windows.Controls
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Module DataGridColumnsIniFile
|
|
||||||
|
|
||||||
Public m_sDataGridColumnsIniFile As String
|
|
||||||
|
|
||||||
Public Function GetPrivateProfileColumns(ParentDGName As String, ByRef ocColumns As ObservableCollection(Of EgtDataGridColumn)) As Boolean
|
|
||||||
Dim colIndex As Integer = 0
|
|
||||||
Dim str = String.Empty
|
|
||||||
While EgtUILib.GetPrivateProfileString(ParentDGName, colIndex, String.Empty, str, m_sDataGridColumnsIniFile) > 0
|
|
||||||
Dim sColumnParams() As String = str.Split(","c)
|
|
||||||
' verifico numero minimo di parametri
|
|
||||||
If sColumnParams.Count >= 7 Then
|
|
||||||
' cancello spazi
|
|
||||||
For index = 0 To sColumnParams.Count - 1
|
|
||||||
sColumnParams(index) = sColumnParams(index).Trim()
|
|
||||||
Next
|
|
||||||
' creo colonna
|
|
||||||
Dim sName = sColumnParams(0)
|
|
||||||
Dim bReorder As Boolean = sColumnParams(1).Equals("1")
|
|
||||||
Dim bResize As Boolean = sColumnParams(2).Equals("1")
|
|
||||||
Dim bSort As Boolean = sColumnParams(3).Equals("1")
|
|
||||||
Dim bIsReadOnly As Boolean = sColumnParams(4).Equals("1")
|
|
||||||
Dim Width As Double
|
|
||||||
Dim WidthType As DataGridLengthUnitType
|
|
||||||
StringToDouble(sColumnParams(5), Width)
|
|
||||||
Integer.TryParse(sColumnParams(6), WidthType)
|
|
||||||
ocColumns.Add(New EgtDataGridColumn(ParentDGName, sName, bReorder, bResize, bSort, bIsReadOnly, New DataGridLength(Width, WidthType)))
|
|
||||||
End If
|
|
||||||
colIndex += 1
|
|
||||||
End While
|
|
||||||
Return ocColumns.Count > 0
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function WriteColumnPrivateProfileParam(ParentDataGridName As String, DisplayIndex As String, sColumnParams As String) As Boolean
|
|
||||||
Return WritePrivateProfileString(ParentDataGridName, DisplayIndex, sColumnParams, m_sDataGridColumnsIniFile)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Module
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<DataGrid x:Class="EgtDataGrid"
|
|
||||||
x:Name="CurrDataGrid"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
||||||
<DataGrid.ColumnHeaderStyle>
|
|
||||||
<Style TargetType="DataGridColumnHeader">
|
|
||||||
<EventSetter Event="SizeChanged" Handler="Cell_SizedChanged" />
|
|
||||||
</Style>
|
|
||||||
</DataGrid.ColumnHeaderStyle>
|
|
||||||
|
|
||||||
</DataGrid>
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,275 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.Collections.Specialized
|
|
||||||
Imports System.Windows
|
|
||||||
Imports System.Windows.Controls
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class EgtDataGrid
|
|
||||||
|
|
||||||
Sub New()
|
|
||||||
InitializeComponent()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Shadows Property BindingColumns As ObservableCollection(Of EgtDataGridColumn)
|
|
||||||
Get
|
|
||||||
Return CType(MyBase.GetValue(BindingColumnsProperty), ObservableCollection(Of EgtDataGridColumn))
|
|
||||||
End Get
|
|
||||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
|
||||||
MyBase.SetValue(BindingColumnsProperty, value)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Shared ReadOnly BindingColumnsProperty As DependencyProperty = DependencyProperty.Register("BindingColumns", GetType(ObservableCollection(Of EgtDataGridColumn)), GetType(EgtDataGrid), New FrameworkPropertyMetadata(New ObservableCollection(Of EgtDataGridColumn), New PropertyChangedCallback(AddressOf OnDataGridColumnsPropertyChanged)) With {.BindsTwoWayByDefault = True})
|
|
||||||
|
|
||||||
Private Shared Sub OnDataGridColumnsPropertyChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
|
|
||||||
Dim context = TryCast(source, EgtDataGrid)
|
|
||||||
Dim oldItems = TryCast(e.OldValue, ObservableCollection(Of EgtDataGridColumn))
|
|
||||||
|
|
||||||
If oldItems IsNot Nothing Then
|
|
||||||
|
|
||||||
For Index = 0 To oldItems.Count - 1
|
|
||||||
Dim Column As DataGridColumn = context.FindResource(oldItems(Index))
|
|
||||||
context.Columns.Remove(Column)
|
|
||||||
Next
|
|
||||||
|
|
||||||
RemoveHandler oldItems.CollectionChanged, AddressOf context.collectionChanged
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim newItems = TryCast(e.NewValue, ObservableCollection(Of EgtDataGridColumn))
|
|
||||||
|
|
||||||
If newItems IsNot Nothing Then
|
|
||||||
|
|
||||||
For Index = 0 To newItems.Count - 1
|
|
||||||
Dim col As DataGridColumn = context.FindResource(newItems(Index).Name)
|
|
||||||
newItems(Index).InitColumn(col)
|
|
||||||
context.Columns.Add(col)
|
|
||||||
Next
|
|
||||||
|
|
||||||
AddHandler newItems.CollectionChanged, AddressOf context.collectionChanged
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub collectionChanged(ByVal sender As Object, ByVal e As NotifyCollectionChangedEventArgs)
|
|
||||||
Select Case e.Action
|
|
||||||
Case NotifyCollectionChangedAction.Add
|
|
||||||
|
|
||||||
If e.NewItems IsNot Nothing Then
|
|
||||||
|
|
||||||
For Each one As EgtDataGridColumn In e.NewItems
|
|
||||||
Dim col As DataGridColumn = CurrDataGrid.FindResource(one.Name)
|
|
||||||
one.InitColumn(col)
|
|
||||||
CurrDataGrid.Columns.Insert(e.NewStartingIndex, col)
|
|
||||||
If col.DisplayIndex <> e.NewStartingIndex Then
|
|
||||||
CurrDataGrid.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
Case NotifyCollectionChangedAction.Remove
|
|
||||||
|
|
||||||
If e.OldItems IsNot Nothing Then
|
|
||||||
|
|
||||||
For Each one As EgtDataGridColumn In e.OldItems
|
|
||||||
Dim col As DataGridColumn = CurrDataGrid.FindResource(one.Name)
|
|
||||||
CurrDataGrid.Columns.Remove(col)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
Case NotifyCollectionChangedAction.Move
|
|
||||||
'Dim col As DataGridColumn = CurrDataGrid.FindResource(BindingColumns(e.OldStartingIndex))
|
|
||||||
'col.DisplayIndex = e.NewStartingIndex
|
|
||||||
CurrDataGrid.Columns.Move(e.OldStartingIndex, e.NewStartingIndex)
|
|
||||||
CurrDataGrid.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
|
|
||||||
'Dim x = CurrDataGrid.Columns(e.OldStartingIndex).DisplayIndex
|
|
||||||
Case NotifyCollectionChangedAction.Reset
|
|
||||||
CurrDataGrid.Columns.Clear()
|
|
||||||
|
|
||||||
If e.NewItems IsNot Nothing Then
|
|
||||||
|
|
||||||
For Each one As DataGridColumn In e.NewItems
|
|
||||||
Dim col As DataGridColumn = CurrDataGrid.FindResource(one)
|
|
||||||
CurrDataGrid.Columns.Add(col)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
Case NotifyCollectionChangedAction.Replace
|
|
||||||
Dim col As DataGridColumn = CurrDataGrid.FindResource(e.NewItems(0))
|
|
||||||
CurrDataGrid.Columns(e.NewStartingIndex) = col
|
|
||||||
End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub Cell_SizedChanged(sender As Object, e As SizeChangedEventArgs)
|
|
||||||
' ad ogni ridimensionamento della cella del ColumnHeader salvo le nuove dimensioni nell'ini
|
|
||||||
If Not IsNothing(e.OriginalSource.Column) AndAlso Not IsNothing(BindingColumns(e.OriginalSource.Column.DisplayIndex)) Then
|
|
||||||
BindingColumns(e.OriginalSource.Column.DisplayIndex).SaveDataGridColumn()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public OldIndex As Integer = 0
|
|
||||||
|
|
||||||
Private Sub CurrDataGrid_ColumnReordering(sender As Object, e As DataGridColumnEventArgs) Handles CurrDataGrid.ColumnReordering
|
|
||||||
' conservo il vecchio indice in modo da effettuare lo scambio in BindingColumns una volta riordinate graficamente
|
|
||||||
OldIndex = e.Column.DisplayIndex
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CurrDataGrid_ColumnReordered(sender As Object, e As DataGridColumnEventArgs) Handles CurrDataGrid.ColumnReordered
|
|
||||||
' scambio le colonne in BindingColumns
|
|
||||||
BindingColumns.Move(OldIndex, e.Column.DisplayIndex)
|
|
||||||
' scrivo tutte le colonne interessate dallo spostamento
|
|
||||||
' (se OldIndex > e.Column.DisplayIndex, il ciclo non viene eseguito quindi lo faccio nell'altro senso)
|
|
||||||
For index = OldIndex To e.Column.DisplayIndex
|
|
||||||
BindingColumns(index).SaveDataGridColumn()
|
|
||||||
Next
|
|
||||||
For index = e.Column.DisplayIndex To OldIndex
|
|
||||||
BindingColumns(index).SaveDataGridColumn()
|
|
||||||
Next
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class EgtDataGridColumn
|
|
||||||
|
|
||||||
Private m_dgColumn As DataGridColumn
|
|
||||||
|
|
||||||
Private Property m_ParentDataGridName As String
|
|
||||||
Public Property ParentDataGridName As String
|
|
||||||
Get
|
|
||||||
Return m_ParentDataGridName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_ParentDataGridName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property m_Name As String
|
|
||||||
Public Property Name As String
|
|
||||||
Get
|
|
||||||
Return m_Name
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_Name = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property m_Width As DataGridLength
|
|
||||||
Public Property Width As DataGridLength
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.Width
|
|
||||||
End Get
|
|
||||||
Set(value As DataGridLength)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.Width = value
|
|
||||||
Else
|
|
||||||
m_Width = value
|
|
||||||
End If
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property m_DisplayIndex As Integer
|
|
||||||
Public Property DisplayIndex As Integer
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.DisplayIndex
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.DisplayIndex = value
|
|
||||||
Else
|
|
||||||
m_DisplayIndex = value
|
|
||||||
End If
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property m_IsReadOnly As Boolean = True
|
|
||||||
Public Property IsReadOnly As Boolean
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.IsReadOnly
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.IsReadOnly = value
|
|
||||||
Else
|
|
||||||
m_IsReadOnly = value
|
|
||||||
End If
|
|
||||||
SaveDataGridColumn()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_CanUserReorder As Boolean
|
|
||||||
Public Property CanUserReorder As Boolean
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.CanUserReorder
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.CanUserReorder = value
|
|
||||||
Else
|
|
||||||
m_CanUserReorder = value
|
|
||||||
End If
|
|
||||||
SaveDataGridColumn()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_CanUserResize As Boolean
|
|
||||||
Public Property CanUserResize As Boolean
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.CanUserResize
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.CanUserResize = value
|
|
||||||
Else
|
|
||||||
m_CanUserResize = value
|
|
||||||
End If
|
|
||||||
SaveDataGridColumn()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_CanUserSort As Boolean
|
|
||||||
Public Property CanUserSort As Boolean
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.CanUserSort
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.CanUserSort = value
|
|
||||||
Else
|
|
||||||
m_CanUserSort = value
|
|
||||||
End If
|
|
||||||
SaveDataGridColumn()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New(sName As String)
|
|
||||||
m_Name = sName
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Sub New(sParentDG As String, sName As String, bCanUserReorder As Boolean, bCanUserResize As Boolean, bCanUserSort As Boolean, bIsReadOnly As Boolean, Width As DataGridLength)
|
|
||||||
m_ParentDataGridName = sParentDG
|
|
||||||
m_Name = sName
|
|
||||||
m_CanUserReorder = bCanUserReorder
|
|
||||||
m_CanUserResize = bCanUserResize
|
|
||||||
m_CanUserSort = bCanUserSort
|
|
||||||
m_IsReadOnly = bIsReadOnly
|
|
||||||
m_Width = Width
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub InitColumn(dgColumn As DataGridColumn)
|
|
||||||
m_dgColumn = dgColumn
|
|
||||||
m_dgColumn.CanUserReorder = m_CanUserReorder
|
|
||||||
m_dgColumn.CanUserResize = m_CanUserResize
|
|
||||||
m_dgColumn.CanUserSort = m_CanUserSort
|
|
||||||
m_dgColumn.IsReadOnly = m_IsReadOnly
|
|
||||||
'm_dgColumn.DisplayIndex = m_DisplayIndex
|
|
||||||
m_dgColumn.Width = m_Width
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' funzione per calcolare e scrivere la stringa dei parametri della colonna nell'INI
|
|
||||||
Public Function SaveDataGridColumn() As Boolean
|
|
||||||
Dim bOk As Boolean
|
|
||||||
Dim sColumnParams = String.Empty
|
|
||||||
sColumnParams = Name & "," & If(CanUserReorder, 1, 0) & "," & If(CanUserResize, 1, 0) & "," & If(CanUserSort, 1, 0) & "," & If(IsReadOnly, 1, 0) & "," & DoubleToString(Width.Value, 6) & "," & Width.UnitType
|
|
||||||
bOk = WriteColumnPrivateProfileParam(ParentDataGridName, DisplayIndex, sColumnParams)
|
|
||||||
Return bOk
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -21,7 +21,7 @@ Public Class NewMachGroupPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Protected m_MachGroupVMList As ObservableCollection(Of MachGroupVM)
|
Private m_MachGroupVMList As ObservableCollection(Of MachGroupVM)
|
||||||
Public Property MachGroupVMList As ObservableCollection(Of MachGroupVM)
|
Public Property MachGroupVMList As ObservableCollection(Of MachGroupVM)
|
||||||
Get
|
Get
|
||||||
Return m_MachGroupVMList
|
Return m_MachGroupVMList
|
||||||
@@ -31,7 +31,7 @@ Public Class NewMachGroupPanelVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Protected m_SelectedMachGroup As MachGroupVM
|
Private m_SelectedMachGroup As MachGroupVM
|
||||||
Public Property SelectedMachGroup As MachGroupVM
|
Public Property SelectedMachGroup As MachGroupVM
|
||||||
Get
|
Get
|
||||||
Return m_SelectedMachGroup
|
Return m_SelectedMachGroup
|
||||||
|
|||||||
@@ -1,126 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.Collections.Specialized
|
|
||||||
Imports System.ComponentModel
|
|
||||||
Imports System.IO
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class BeamMachGroupVM
|
|
||||||
Inherits MyMachGroupVM
|
|
||||||
|
|
||||||
Public ReadOnly Property m_BeamMachGroupM As BeamMachGroupM
|
|
||||||
Get
|
|
||||||
Return m_MachGroupM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Property sStartCut As String
|
|
||||||
Get
|
|
||||||
Return LenToString(m_BeamMachGroupM.dStartCut, 3)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
StringToLen(value, m_BeamMachGroupM.dStartCut)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Public Property dStartCut As Double
|
|
||||||
Get
|
|
||||||
Return m_BeamMachGroupM.dStartCut
|
|
||||||
End Get
|
|
||||||
Set(value As Double)
|
|
||||||
m_BeamMachGroupM.dStartCut = value
|
|
||||||
NotifyPropertyChanged(NameOf(sStartCut))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property SelBeam As BeamVM
|
|
||||||
Get
|
|
||||||
Return m_SelPart
|
|
||||||
End Get
|
|
||||||
Set(value As BeamVM)
|
|
||||||
m_SelPart = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
|
||||||
|
|
||||||
Sub New(BeamMachGroupM As BeamMachGroupM)
|
|
||||||
MyBase.New(BeamMachGroupM)
|
|
||||||
AddHandler m_BeamMachGroupM.PartAdded, AddressOf OnBeamAdded
|
|
||||||
AddHandler m_BeamMachGroupM.PartRemoved, AddressOf OnBeamRemoved
|
|
||||||
CreateBeamVMList()
|
|
||||||
' Aggiorno stato da stati feature
|
|
||||||
CalcGlobalUpdate()
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Private Sub CreateBeamVMList()
|
|
||||||
Dim all As List(Of BeamVM) = (From BeamM In m_BeamMachGroupM.GetParts()
|
|
||||||
Select New BeamVM(BeamM, Me)).ToList()
|
|
||||||
|
|
||||||
For Each BeamVM As BeamVM In all
|
|
||||||
AddHandler BeamVM.PropertyChanged, AddressOf OnBeamVMPropertyChanged
|
|
||||||
Next
|
|
||||||
|
|
||||||
m_PartVMList = New ObservableCollection(Of PartVM)(all)
|
|
||||||
AddHandler m_PartVMList.CollectionChanged, AddressOf OnBeamVMListChanged
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub RefreshPartList()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub RefreshGroupData()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
|
||||||
|
|
||||||
#Region "EVENTS"
|
|
||||||
|
|
||||||
Private Sub OnBeamAdded(sender As Object, e As PartAddedEventArgs)
|
|
||||||
Dim BeamVM As BeamVM = New BeamVM(e.NewPart, Me)
|
|
||||||
PartVMList.Add(BeamVM)
|
|
||||||
End Sub
|
|
||||||
Private Sub OnBeamRemoved(sender As Object, e As PartAddedEventArgs)
|
|
||||||
Dim BeamVM As BeamVM = PartVMList.FirstOrDefault(Function(x) x.PartM Is e.m_NewPart)
|
|
||||||
If Not IsNothing(BeamVM) Then PartVMList.Remove(BeamVM)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnBeamVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
|
||||||
If e.Action = NotifyCollectionChangedAction.Add Then
|
|
||||||
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
|
||||||
For Each BeamVM As BeamVM In e.NewItems
|
|
||||||
AddHandler BeamVM.PropertyChanged, AddressOf OnBeamVMPropertyChanged
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If e.Action = NotifyCollectionChangedAction.Remove Then
|
|
||||||
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
|
||||||
For Each BeamVM As BeamVM In e.OldItems
|
|
||||||
RemoveHandler BeamVM.PropertyChanged, AddressOf OnBeamVMPropertyChanged
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If e.Action = NotifyCollectionChangedAction.Move Then
|
|
||||||
Dim ItemVM As PartVM = e.OldItems(0)
|
|
||||||
m_BeamMachGroupM.PartMList.RemoveAt(e.OldStartingIndex)
|
|
||||||
m_BeamMachGroupM.PartMList.Insert(e.NewStartingIndex, ItemVM.PartM)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnBeamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
|
||||||
'Select Case e.PropertyName
|
|
||||||
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
|
||||||
'End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.IO
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class BeamVM
|
|
||||||
Inherits PartVM
|
|
||||||
|
|
||||||
Public ReadOnly Property m_BeamM As BeamM
|
|
||||||
Get
|
|
||||||
Return m_PartM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Property sOffset As String
|
|
||||||
Get
|
|
||||||
Return LenToString(m_BeamM.dOffset, 3)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
StringToLen(value, m_BeamM.dOffset)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property dOffset As Double
|
|
||||||
Get
|
|
||||||
Return m_BeamM.dOffset
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
|
||||||
|
|
||||||
Sub New(BeamM As BeamM)
|
|
||||||
MyBase.New(BeamM)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Sub New(BeamM As BeamM, ParentMachGroupVM As BeamMachGroupVM)
|
|
||||||
MyBase.New(BeamM, ParentMachGroupVM)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.ComponentModel
|
|
||||||
Imports System.IO
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class MyMachGroupPanelVM
|
|
||||||
Inherits NewMachGroupPanelVM
|
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
|
||||||
|
|
||||||
Public ReadOnly Property m_MyMachGroupPanelM As MyMachGroupPanelM
|
|
||||||
Get
|
|
||||||
Return m_MachGroupPanelM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sTotMachGroups As String
|
|
||||||
Get
|
|
||||||
Return m_MachGroupVMList.Count()
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sTotVolume As String
|
|
||||||
Get
|
|
||||||
Dim dMMTotVolume As Double = m_MachGroupVMList.Sum(CType(Function(x As MyMachGroupVM) x.dUnitVolume, Func(Of MachGroupVM, Double)))
|
|
||||||
Return If(EgtUiUnitsAreMM(), DoubleToString(dMMTotVolume / 1000000000, 3), DoubleToString(dMMTotVolume * (12 / ONEINCH), 3))
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sTotTime As String
|
|
||||||
Get
|
|
||||||
Return TimeSpan.FromSeconds(m_MachGroupVMList.Sum(CType(Function(x As MyMachGroupVM) x.nCALC_TIME, Func(Of MachGroupVM, Double)))).ToString()
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
|
||||||
|
|
||||||
Sub New(MachGroupPanelM As MachGroupPanelM)
|
|
||||||
MyBase.New(MachGroupPanelM)
|
|
||||||
' Creo riferimento a questa classe in Map
|
|
||||||
CoreMap.SetRefMachGroupPanelVM(Me)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Protected Overrides Sub CreateMachGroupVMList()
|
|
||||||
Dim all As New List(Of MachGroupVM)
|
|
||||||
For Each MachGroupM In m_MachGroupPanelM.GetMachGroups()
|
|
||||||
If DirectCast(MachGroupM, MyMachGroupM).nMachineType = MachineType.BEAM Then
|
|
||||||
all.Add(New BeamMachGroupVM(MachGroupM))
|
|
||||||
Else
|
|
||||||
all.Add(New WallMachGroupVM(MachGroupM))
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each MachGroupvM As MachGroupVM In all
|
|
||||||
AddHandler MachGroupvM.PropertyChanged, AddressOf OnMachGroupVMPropertyChanged
|
|
||||||
Next
|
|
||||||
|
|
||||||
MachGroupVMList = New ObservableCollection(Of MachGroupVM)(all)
|
|
||||||
AddHandler MachGroupVMList.CollectionChanged, AddressOf OnMachGroupVMListChanged
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Function InitMachGroupList(Optional bUseDefaults As Boolean = False) As Boolean
|
|
||||||
' Svuoto precedente lista di MachGroup
|
|
||||||
MachGroupVMList.Clear()
|
|
||||||
' aggiorno copie
|
|
||||||
MyMachGroupPanelM.UpdateDuplo()
|
|
||||||
' verifico se esistono già gruppi di lavorazione o se devo creare il primo
|
|
||||||
Dim bOk As Boolean = False
|
|
||||||
Dim nId = EgtGetFirstMachGroup()
|
|
||||||
If nId <> GDB_ID.NULL Then
|
|
||||||
bOk = EgtSetCurrMachGroup(nId)
|
|
||||||
End If
|
|
||||||
If Not bOk Then Return True
|
|
||||||
' carico lista dei gruppi di lavorazione
|
|
||||||
m_MachGroupPanelM.MachGroupMList = MyMachGroupPanelM.LoadMyMachGroups(CoreMap.refMachinePanelVM.MachineList.ToList())
|
|
||||||
' elimino copie da cancellare
|
|
||||||
MyMachGroupPanelM.DeleteDuplo()
|
|
||||||
If bOk Then SelectedMachGroup = MachGroupVMList(0)
|
|
||||||
EgtZoom(ZM.ALL)
|
|
||||||
Return True
|
|
||||||
End Function
|
|
||||||
|
|
||||||
'Public Overrides Sub AddMachGroup()
|
|
||||||
' Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(CurrentMachine.sMachineName, Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
|
||||||
' ' e lo seleziono
|
|
||||||
' SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Public Overrides Function OnPreSetCurrMachGroup() As Boolean
|
|
||||||
EgtSetCurrentContext(CoreMap.refSceneHostVM.MainScene.GetCtx())
|
|
||||||
Return True
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Overrides Function OnPostSetCurrMachGroup() As Boolean
|
|
||||||
' resetto eventuale selezione pezzo
|
|
||||||
DirectCast(SelectedMachGroup, MyMachGroupVM).SelPart = Nothing
|
|
||||||
' Imposto vista solo tavola
|
|
||||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
|
||||||
Dim View As VT
|
|
||||||
For Each Mach As MyMachine In CoreMap.refMachinePanelVM.MachineList
|
|
||||||
If Mach.Name = SelectedMachGroup.Machine Then
|
|
||||||
If Mach.nType = Core.ConstBeam.MachineType.BEAM Then
|
|
||||||
View = VT.ISO_SW
|
|
||||||
Else
|
|
||||||
View = VT.TOP
|
|
||||||
End If
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
EgtSetView(View, False)
|
|
||||||
EgtZoom(ZM.ALL)
|
|
||||||
Return True
|
|
||||||
End Function
|
|
||||||
|
|
||||||
' funzione che seleziona primo gruppo
|
|
||||||
'Friend Sub SelFirstMachGroup()
|
|
||||||
' If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
|
||||||
' SelectedMachGroup = MachGroupVMList(0)
|
|
||||||
' Else
|
|
||||||
' SelectedMachGroup = Nothing
|
|
||||||
' EgtResetCurrMachGroup()
|
|
||||||
' ' nascondo tutti i pezzi
|
|
||||||
' Map.refProjectVM.BTLStructureVM.HideAll()
|
|
||||||
' End If
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
' funzione che seleziona ultimo gruppo
|
|
||||||
Public Sub SelLastMachGroup()
|
|
||||||
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
|
||||||
SelectedMachGroup = MachGroupVMList(MachGroupVMList.Count - 1)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Function GetLastMachGroup() As MachGroupVM
|
|
||||||
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
|
||||||
Return MachGroupVMList(MachGroupVMList.Count - 1)
|
|
||||||
End If
|
|
||||||
Return Nothing
|
|
||||||
End Function
|
|
||||||
|
|
||||||
' funzione che aggiorna totale tempi a fine calcolo
|
|
||||||
Public Sub CalcGlobalTime()
|
|
||||||
NotifyPropertyChanged(NameOf(sTotTime))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' funzione che aggiorna numero gruppi di lavorazione e volume totale
|
|
||||||
Public Sub CalcGlobalUpdate()
|
|
||||||
NotifyPropertyChanged(NameOf(sTotMachGroups))
|
|
||||||
NotifyPropertyChanged(NameOf(sTotVolume))
|
|
||||||
NotifyPropertyChanged(NameOf(sTotTime))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
#Region "EVENTS"
|
|
||||||
|
|
||||||
Protected Overrides Sub OnMachGroupAdded(sender As Object, e As MachGroupAddedEventArgs)
|
|
||||||
Dim MachGroupVM As MachGroupVM = Nothing
|
|
||||||
Select Case DirectCast(e.NewMachGroupM, MyMachGroupM).nMachineType
|
|
||||||
Case Core.ConstBeam.MachineType.BEAM
|
|
||||||
MachGroupVM = New BeamMachGroupVM(e.NewMachGroupM)
|
|
||||||
Case Core.ConstBeam.MachineType.WALL
|
|
||||||
MachGroupVM = New WallMachGroupVM(e.NewMachGroupM)
|
|
||||||
Case Core.ConstBeam.MachineType.NULL
|
|
||||||
Return
|
|
||||||
End Select
|
|
||||||
MachGroupVMList.Add(MachGroupVM)
|
|
||||||
NotifyPropertyChanged(NameOf(MachGroupVMList))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Overrides Sub OnMachGroupVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
|
||||||
Select Case e.PropertyName
|
|
||||||
'Case nameof(sender.sMATERIAL)
|
|
||||||
End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' EVENTS
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,422 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Windows
|
|
||||||
Imports System.Windows.Input
|
|
||||||
Imports System.Windows.Media
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public MustInherit Class MyMachGroupVM
|
|
||||||
Inherits MachGroupVM
|
|
||||||
|
|
||||||
Public ReadOnly Property MyMachGroupM As MyMachGroupM
|
|
||||||
Get
|
|
||||||
Return m_MachGroupM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nMachineType As MachineType
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.nMachineType
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property dL As Double
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.dL
|
|
||||||
End Get
|
|
||||||
Set(value As Double)
|
|
||||||
MyMachGroupM.dL = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property dW As Double
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.dW
|
|
||||||
End Get
|
|
||||||
Set(value As Double)
|
|
||||||
MyMachGroupM.dW = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property dH As Double
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.dH
|
|
||||||
End Get
|
|
||||||
Set(value As Double)
|
|
||||||
MyMachGroupM.dH = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property dtStartTime As DateTime
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.dtStartTime
|
|
||||||
End Get
|
|
||||||
Set(value As DateTime)
|
|
||||||
MyMachGroupM.dtStartTime = value
|
|
||||||
NotifyPropertyChanged(NameOf(Production_Background))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property dtEndTime As DateTime
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.dtEndTime
|
|
||||||
End Get
|
|
||||||
Set(value As DateTime)
|
|
||||||
MyMachGroupM.dtEndTime = value
|
|
||||||
NotifyPropertyChanged(NameOf(Production_Background))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property dUsage As Double
|
|
||||||
Get
|
|
||||||
Return If(MyMachGroupM.dMatForPart > 0 AndAlso MyMachGroupM.dTotMat > 0, MyMachGroupM.dMatForPart / MyMachGroupM.dTotMat * 100, 0)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property dWaste As Double
|
|
||||||
Get
|
|
||||||
Return If(MyMachGroupM.dMatForPart > 0 AndAlso MyMachGroupM.dTotMat > 0, (MyMachGroupM.dTotMat - MyMachGroupM.dMatForPart) / MyMachGroupM.dTotMat * 100, 0)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sUsage As String
|
|
||||||
Get
|
|
||||||
Return DoubleToString(dUsage, 3)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sWaste As String
|
|
||||||
Get
|
|
||||||
Return DoubleToString(dWaste, 3)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property sMATERIAL As String
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.sMATERIAL
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
MyMachGroupM.sMATERIAL = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' lista dei pezzi che sono nel grezzo
|
|
||||||
Protected m_PartVMList As New ObservableCollection(Of PartVM)
|
|
||||||
Public Property PartVMList As ObservableCollection(Of PartVM)
|
|
||||||
Get
|
|
||||||
Return m_PartVMList
|
|
||||||
End Get
|
|
||||||
Set(value As ObservableCollection(Of PartVM))
|
|
||||||
m_PartVMList = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_SelPart As PartVM
|
|
||||||
Public Overridable Property SelPart As PartVM
|
|
||||||
Get
|
|
||||||
Return m_SelPart
|
|
||||||
End Get
|
|
||||||
Set(value As PartVM)
|
|
||||||
m_SelPart = value
|
|
||||||
' seleziono pezzo
|
|
||||||
EgtDeselectAll()
|
|
||||||
If Not IsNothing(value) Then EgtSelectObj(SelPart.nPartId)
|
|
||||||
EgtDraw()
|
|
||||||
NotifyPropertyChanged(NameOf(SelPart))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nCALC_ERR As Integer
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.nCALC_ERR
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nCALC_FALL As Integer
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.nCALC_FALL
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sCALC_MSG As String
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.sCALC_MSG
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nCALC_ROT As Integer
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.nCALC_ROT
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
MyMachGroupM.nCALC_ROT = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nCALC_TIME As Integer
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.nCALC_TIME
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
MyMachGroupM.nCALC_TIME = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nGlobalState As CalcStates
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.nCALC_GlobalState
|
|
||||||
End Get
|
|
||||||
Set(value As CalcStates)
|
|
||||||
MyMachGroupM.nCALC_GlobalState = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nCALC_State As CalcStates
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.nCALC_State
|
|
||||||
End Get
|
|
||||||
Set(value As CalcStates)
|
|
||||||
MyMachGroupM.nCALC_State = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property Calc_Background As SolidColorBrush
|
|
||||||
Get
|
|
||||||
If MyMachGroupM.nCALC_GlobalState = CalcStates.OK Then
|
|
||||||
Return Brushes.Green
|
|
||||||
ElseIf MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED Then
|
|
||||||
Return Brushes.LightGray
|
|
||||||
ElseIf MyMachGroupM.nCALC_GlobalState = CalcStates.INFO Then
|
|
||||||
Return Brushes.Green
|
|
||||||
ElseIf MyMachGroupM.nCALC_GlobalState = CalcStates.WARNING Then
|
|
||||||
Return Brushes.Gold
|
|
||||||
ElseIf MyMachGroupM.nCALC_GlobalState = CalcStates.ERROR_ Then
|
|
||||||
Return Brushes.Red
|
|
||||||
Else
|
|
||||||
Return Brushes.Red
|
|
||||||
End If
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nProduction_State As Integer
|
|
||||||
Get
|
|
||||||
Return MyMachGroupM.nProductionState
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable ReadOnly Property Production_Background As SolidColorBrush
|
|
||||||
Get
|
|
||||||
If dtEndTime <> DateTime.MinValue Then ' barra finita
|
|
||||||
Return Brushes.LightGray
|
|
||||||
ElseIf dtStartTime <> DateTime.MinValue Then ' barra iniziata
|
|
||||||
Return Brushes.Green
|
|
||||||
Else ' barra in coda
|
|
||||||
Return Brushes.White
|
|
||||||
End If
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return If(MyMachGroupM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return If(MyMachGroupM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_ERR_Letter As String
|
|
||||||
Get
|
|
||||||
Select Case MyMachGroupM.nCALC_GlobalERR
|
|
||||||
Case 22
|
|
||||||
Return "c"
|
|
||||||
Case 19, 23, 24, 25
|
|
||||||
Return "e"
|
|
||||||
Case 17
|
|
||||||
Return "w"
|
|
||||||
Case < 0
|
|
||||||
Return "i"
|
|
||||||
Case Else
|
|
||||||
Return ""
|
|
||||||
End Select
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
|
||||||
Get
|
|
||||||
Select Case MyMachGroupM.m_nCALC_GlobalState
|
|
||||||
Case CalcStates.ERROR_
|
|
||||||
Return Brushes.Red
|
|
||||||
Case CalcStates.WARNING
|
|
||||||
Return Brushes.Orange
|
|
||||||
Case CalcStates.INFO
|
|
||||||
Return Brushes.Green
|
|
||||||
Case Else
|
|
||||||
Return Brushes.Red
|
|
||||||
End Select
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sUnitTime As String
|
|
||||||
Get
|
|
||||||
Return TimeSpan.FromSeconds(nCALC_TIME).ToString()
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property dUnitVolume As Double
|
|
||||||
Get
|
|
||||||
Return dL * dW * dH
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property Section As SectionXMaterial
|
|
||||||
Get
|
|
||||||
Return New SectionXMaterial(dW, dH, dL, MyMachGroupM.sMATERIAL)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' definizione comandi
|
|
||||||
Private m_cmdDeleteMachGroup As ICommand
|
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
|
||||||
|
|
||||||
Sub New(MyMachGroupM As MyMachGroupM)
|
|
||||||
MyBase.New(MyMachGroupM)
|
|
||||||
'aggiorno lista pezzi
|
|
||||||
RefreshPartList()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Public Overridable Function Copy() As MyMachGroupVM
|
|
||||||
Return Nothing
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
Public MustOverride Sub RefreshPartList()
|
|
||||||
|
|
||||||
Public MustOverride Sub RefreshGroupData()
|
|
||||||
|
|
||||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
|
||||||
Public Sub CalcMachGroupUpdate(ERR As Integer, ROT As Integer, MSG As String)
|
|
||||||
EgtSetInfo(Id, ITG_PROD_ERR, ERR, True)
|
|
||||||
EgtSetInfo(Id, ITG_PROD_MSG, MSG, True)
|
|
||||||
EgtSetInfo(Id, ITG_PROD_ROT, ROT, True)
|
|
||||||
MyMachGroupM.nCALC_ERR = ERR
|
|
||||||
MyMachGroupM.nCALC_ROT = ROT
|
|
||||||
MyMachGroupM.sCALC_MSG = MSG
|
|
||||||
If ERR = 0 Then
|
|
||||||
nCALC_State = CalcStates.OK
|
|
||||||
ElseIf ERR = 17 Then
|
|
||||||
nCALC_State = CalcStates.WARNING
|
|
||||||
ElseIf ERR > 0 Then
|
|
||||||
nCALC_State = CalcStates.ERROR_
|
|
||||||
ElseIf ERR < 0 Then
|
|
||||||
nCALC_State = CalcStates.INFO
|
|
||||||
End If
|
|
||||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub ResetCalcMachGroup()
|
|
||||||
EgtRemoveInfo(Id, ITG_PROD_ERR)
|
|
||||||
EgtRemoveInfo(Id, ITG_PROD_MSG)
|
|
||||||
EgtRemoveInfo(Id, ITG_PROD_ROT)
|
|
||||||
MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
|
||||||
MyMachGroupM.nCALC_State = CalcStates.NOTCALCULATED
|
|
||||||
MyMachGroupM.nCALC_GlobalERR = 0
|
|
||||||
MyMachGroupM.nCALC_ERR = 0
|
|
||||||
MyMachGroupM.nCALC_ROT = 0
|
|
||||||
MyMachGroupM.nCALC_FALL = 0
|
|
||||||
MyMachGroupM.sCALC_MSG = ""
|
|
||||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
|
||||||
Public Sub CalcGlobalUpdate()
|
|
||||||
MyMachGroupM.nCALC_GlobalERR = nCALC_ERR
|
|
||||||
MyMachGroupM.nCALC_GlobalState = nCALC_State
|
|
||||||
For Each Part In MyMachGroupM.PartMList
|
|
||||||
If Part.nCALC_GlobalState = CalcStates.NOTCALCULATED Then
|
|
||||||
MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
|
||||||
Exit For
|
|
||||||
ElseIf Part.nCALC_GlobalState = CalcStates.OK AndAlso MyMachGroupM.m_nCALC_GlobalState = Core.CalcStates.NOTCALCULATED Then
|
|
||||||
MyMachGroupM.nCALC_GlobalState = CalcStates.OK
|
|
||||||
ElseIf Part.nCALC_GlobalState = CalcStates.INFO And (MyMachGroupM.nCALC_GlobalState = CalcStates.OK Or MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED) Then
|
|
||||||
MyMachGroupM.nCALC_GlobalState = CalcStates.INFO
|
|
||||||
ElseIf Part.nCALC_GlobalState = CalcStates.WARNING And (MyMachGroupM.nCALC_GlobalState = CalcStates.OK Or MyMachGroupM.nCALC_GlobalState = CalcStates.INFO Or MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED) Then
|
|
||||||
MyMachGroupM.nCALC_GlobalState = CalcStates.WARNING
|
|
||||||
ElseIf Part.nCALC_GlobalState = CalcStates.ERROR_ And (MyMachGroupM.nCALC_GlobalState = CalcStates.OK Or MyMachGroupM.nCALC_GlobalState = CalcStates.INFO Or MyMachGroupM.nCALC_GlobalState = CalcStates.WARNING Or MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED) Then
|
|
||||||
MyMachGroupM.nCALC_GlobalState = CalcStates.ERROR_
|
|
||||||
End If
|
|
||||||
If Part.nCALC_GlobalERR = 22 Then
|
|
||||||
MyMachGroupM.nCALC_GlobalERR = 22
|
|
||||||
ElseIf Part.nCALC_GlobalERR > 0 And MyMachGroupM.nCALC_GlobalERR <= 0 Then
|
|
||||||
MyMachGroupM.nCALC_GlobalERR = Part.nCALC_GlobalERR
|
|
||||||
ElseIf Part.nCALC_GlobalERR < 0 And MyMachGroupM.nCALC_GlobalERR = 0 Then
|
|
||||||
MyMachGroupM.nCALC_GlobalERR = Part.nCALC_GlobalERR
|
|
||||||
End If
|
|
||||||
If Part.nCALC_ROT <> 0 Then
|
|
||||||
MyMachGroupM.m_nCALC_ROT = Part.nCALC_ROT
|
|
||||||
End If
|
|
||||||
If Part.nCALC_FALL <> 0 Then
|
|
||||||
MyMachGroupM.nCALC_FALL = Part.nCALC_FALL
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub CalcTimeUpdate(TIME As Integer)
|
|
||||||
EgtSetInfo(Id, ITG_PROD_TIME, TIME, True)
|
|
||||||
nCALC_TIME = TIME
|
|
||||||
NotifyPropertyChanged(NameOf(sUnitTime))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
#Region "DeleteMachGroup"
|
|
||||||
|
|
||||||
' Returns a command that manage the MainWindow_Unloaded command
|
|
||||||
Public ReadOnly Property DeleteMachGroup_Command As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdDeleteMachGroup Is Nothing Then
|
|
||||||
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroup)
|
|
||||||
End If
|
|
||||||
Return m_cmdDeleteMachGroup
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Sub DeleteMachGroup()
|
|
||||||
' elimino tutte le copie
|
|
||||||
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
|
||||||
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
|
||||||
While nRawPartId <> GDB_ID.NULL
|
|
||||||
EgtRemovePartFromRawPart(nBeamId)
|
|
||||||
EgtErase(nBeamId)
|
|
||||||
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
|
||||||
nBeamId = EgtGetFirstPartInRawPart(nRawPartId)
|
|
||||||
End While
|
|
||||||
' elimino MachGroup
|
|
||||||
EgtRemoveMachGroup(Me.Id)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' DeleteMachGroup
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,507 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.Collections.Specialized
|
|
||||||
Imports System.ComponentModel
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Windows
|
|
||||||
Imports System.Windows.Input
|
|
||||||
Imports System.Windows.Media
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public MustInherit Class PartVM
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
|
||||||
|
|
||||||
Protected m_PartM As PartM
|
|
||||||
Public ReadOnly Property PartM As PartM
|
|
||||||
Get
|
|
||||||
Return m_PartM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_ParentMachGroupVM As MyMachGroupVM
|
|
||||||
Public ReadOnly Property ParentMachGroupVM As MyMachGroupVM
|
|
||||||
Get
|
|
||||||
Return m_ParentMachGroupVM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' Id geometrico del pezzo
|
|
||||||
Public ReadOnly Property nPartId As Integer
|
|
||||||
Get
|
|
||||||
Return m_PartM.nPartId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' Proj del pezzo
|
|
||||||
Public Property nProjId As Integer
|
|
||||||
Get
|
|
||||||
Return m_PartM.nProjId
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_PartM.nProjId = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' Info del pezzo
|
|
||||||
Public ReadOnly Property nPDN As Integer
|
|
||||||
Get
|
|
||||||
Return m_PartM.nPDN
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sNAM As String
|
|
||||||
Get
|
|
||||||
Return m_PartM.sNAM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sL As String
|
|
||||||
Get
|
|
||||||
Return LenToString(m_PartM.dL, 3)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Property dL As Double
|
|
||||||
Get
|
|
||||||
Return m_PartM.dL
|
|
||||||
End Get
|
|
||||||
Set(value As Double)
|
|
||||||
m_PartM.dL = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sW As String
|
|
||||||
Get
|
|
||||||
Return LenToString(m_PartM.dW, 3)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Property dW As Double
|
|
||||||
Get
|
|
||||||
Return m_PartM.dW
|
|
||||||
End Get
|
|
||||||
Set(value As Double)
|
|
||||||
m_PartM.dW = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sH As String
|
|
||||||
Get
|
|
||||||
Return LenToString(m_PartM.dH, 3)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Property dH As Double
|
|
||||||
Get
|
|
||||||
Return m_PartM.dH
|
|
||||||
End Get
|
|
||||||
Set(value As Double)
|
|
||||||
m_PartM.dH = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Property sPOSX As String
|
|
||||||
Get
|
|
||||||
Return LenToString(m_PartM.dPOSX, 3)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
StringToLen(value, m_PartM.dPOSX)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Public Property dPOSX As Double
|
|
||||||
Get
|
|
||||||
Return m_PartM.dPOSX
|
|
||||||
End Get
|
|
||||||
Set(value As Double)
|
|
||||||
m_PartM.dPOSX = value
|
|
||||||
NotifyPropertyChanged(NameOf(sPOSX))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nCNT As Integer
|
|
||||||
Get
|
|
||||||
Return m_PartM.nCNT
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_PartM.nCNT = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sINVERTED As String
|
|
||||||
Get
|
|
||||||
Return m_PartM.nINVERTED & "°"
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sROTATED As String
|
|
||||||
Get
|
|
||||||
Return m_PartM.nROTATED & "°"
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property sMATERIAL As String
|
|
||||||
Get
|
|
||||||
Return m_PartM.sMATERIAL
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_PartM.sMATERIAL = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nGlobalState As CalcStates
|
|
||||||
Get
|
|
||||||
Return m_PartM.nCALC_GlobalState
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nCALC_GlobalERR As Integer
|
|
||||||
Get
|
|
||||||
Return m_PartM.nCALC_GlobalERR
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_PartM.nCALC_GlobalERR = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nCALC_State As CalcStates
|
|
||||||
Get
|
|
||||||
Return m_PartM.nCALC_State
|
|
||||||
End Get
|
|
||||||
Set(value As CalcStates)
|
|
||||||
m_PartM.nCALC_State = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property Calc_Background As SolidColorBrush
|
|
||||||
Get
|
|
||||||
If m_PartM.nCALC_GlobalState = CalcStates.OK Then
|
|
||||||
Return Brushes.Green
|
|
||||||
ElseIf m_PartM.nCALC_GlobalState = CalcStates.NOTCALCULATED Then
|
|
||||||
Return Brushes.LightGray
|
|
||||||
ElseIf m_PartM.nCALC_GlobalState = CalcStates.INFO Then
|
|
||||||
Return Brushes.Green
|
|
||||||
ElseIf m_PartM.nCALC_GlobalState = CalcStates.WARNING Then
|
|
||||||
Return Brushes.Orange
|
|
||||||
ElseIf m_PartM.nCALC_GlobalState = CalcStates.ERROR_ Then
|
|
||||||
Return Brushes.Red
|
|
||||||
Else
|
|
||||||
Return Brushes.Red
|
|
||||||
End If
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nProduction_State As CalcStates
|
|
||||||
Get
|
|
||||||
Return m_PartM.nProductionState
|
|
||||||
End Get
|
|
||||||
Set(value As CalcStates)
|
|
||||||
m_PartM.SetProductionState(value)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property Production_Background As SolidColorBrush
|
|
||||||
Get
|
|
||||||
If dtEndTime <> DateTime.MinValue Then ' barra finita
|
|
||||||
Return Brushes.LightGray
|
|
||||||
ElseIf dtStartTime <> DateTime.MinValue Then ' barra iniziata
|
|
||||||
Return Brushes.Green
|
|
||||||
Else ' barra in coda
|
|
||||||
Return Brushes.White
|
|
||||||
End If
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return If(m_PartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return If(m_PartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_ERR_Letter As String
|
|
||||||
Get
|
|
||||||
Select Case m_PartM.nCALC_GlobalERR
|
|
||||||
Case 22
|
|
||||||
Return "c"
|
|
||||||
Case 19, 23, 24, 25
|
|
||||||
Return "e"
|
|
||||||
Case 17
|
|
||||||
Return "w"
|
|
||||||
Case < 0
|
|
||||||
Return "i"
|
|
||||||
Case Else
|
|
||||||
Return ""
|
|
||||||
End Select
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
|
||||||
Get
|
|
||||||
Select Case m_PartM.nCALC_GlobalState
|
|
||||||
Case CalcStates.ERROR_
|
|
||||||
Return Brushes.Red
|
|
||||||
Case CalcStates.WARNING
|
|
||||||
Return Brushes.Orange
|
|
||||||
Case CalcStates.INFO
|
|
||||||
Return Brushes.Green
|
|
||||||
Case Else
|
|
||||||
Return Brushes.Red
|
|
||||||
End Select
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nCALC_ERR As Integer
|
|
||||||
Get
|
|
||||||
Return m_PartM.nCALC_ERR
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sCALC_MSG As String
|
|
||||||
Get
|
|
||||||
Return m_PartM.sCALC_MSG
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nCALC_ROT As Integer
|
|
||||||
Get
|
|
||||||
Return m_PartM.nCALC_ROT
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_PartM.nCALC_ROT = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nCALC_FALL As Integer
|
|
||||||
Get
|
|
||||||
Return m_PartM.nCALC_FALL
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_PartM.nCALC_FALL = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property nCALC_TIME As Integer
|
|
||||||
Get
|
|
||||||
Return m_PartM.nCALC_TIME
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
m_PartM.nCALC_TIME = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' lista delle feature del pezzo
|
|
||||||
Protected m_FeatureVMList As ObservableCollection(Of BTLFeatureVM)
|
|
||||||
Public Property FeatureVMList As ObservableCollection(Of BTLFeatureVM)
|
|
||||||
Get
|
|
||||||
Return m_FeatureVMList
|
|
||||||
End Get
|
|
||||||
Set(value As ObservableCollection(Of BTLFeatureVM))
|
|
||||||
m_FeatureVMList = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_SelFeatureVM As BTLFeatureVM
|
|
||||||
Public Property SelFeatureVM As BTLFeatureVM
|
|
||||||
Get
|
|
||||||
Return m_SelFeatureVM
|
|
||||||
End Get
|
|
||||||
Set(value As BTLFeatureVM)
|
|
||||||
m_SelFeatureVM = value
|
|
||||||
If Not IsNothing(m_SelFeatureVM) Then
|
|
||||||
DirectCast(m_SelFeatureVM, BTLFeatureVM).SelGeomFeature()
|
|
||||||
Else
|
|
||||||
EgtDeselectAll()
|
|
||||||
End If
|
|
||||||
EgtDraw()
|
|
||||||
NotifyPropertyChanged(NameOf(SelFeatureVM))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property dtStartTime As DateTime
|
|
||||||
Get
|
|
||||||
Return m_PartM.dtStartTime
|
|
||||||
End Get
|
|
||||||
Set(value As DateTime)
|
|
||||||
m_PartM.dtStartTime = value
|
|
||||||
NotifyPropertyChanged(NameOf(Production_Background))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property dtEndTime As DateTime
|
|
||||||
Get
|
|
||||||
Return m_PartM.dtEndTime
|
|
||||||
End Get
|
|
||||||
Set(value As DateTime)
|
|
||||||
m_PartM.dtEndTime = value
|
|
||||||
NotifyPropertyChanged(NameOf(Production_Background))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' definizione comandi
|
|
||||||
Private m_cmdDeletePart As ICommand
|
|
||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
|
||||||
|
|
||||||
Sub New(PartM As PartM)
|
|
||||||
m_PartM = PartM
|
|
||||||
AddHandler m_PartM.BTLFeatureAdded, AddressOf OnBTLFeatureAdded
|
|
||||||
CreateBTLFeatureVMList()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Sub New(PartM As PartM, ParentMachGroupVM As MyMachGroupVM)
|
|
||||||
m_PartM = PartM
|
|
||||||
m_ParentMachGroupVM = ParentMachGroupVM
|
|
||||||
AddHandler m_PartM.BTLFeatureAdded, AddressOf OnBTLFeatureAdded
|
|
||||||
CreateBTLFeatureVMList()
|
|
||||||
' Aggiorno stato da stati feature
|
|
||||||
CalcGlobalUpdate()
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
|
||||||
|
|
||||||
Private Sub CreateBTLFeatureVMList()
|
|
||||||
Dim all As List(Of BTLFeatureVM) = (From BTLFeatureM In m_PartM.GetBTLFeatures()
|
|
||||||
Select New BTLFeatureVM(BTLFeatureM)).ToList()
|
|
||||||
|
|
||||||
For Each BTLFeatureVM As BTLFeatureVM In all
|
|
||||||
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
|
||||||
Next
|
|
||||||
|
|
||||||
m_FeatureVMList = New ObservableCollection(Of BTLFeatureVM)(all)
|
|
||||||
AddHandler m_FeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
|
||||||
Public Sub CalcPartUpdate(ERR As Integer, ROT As Integer, MSG As String)
|
|
||||||
EgtSetInfo(nPartId, ITG_PROD_ERR, ERR, True)
|
|
||||||
EgtSetInfo(nPartId, ITG_PROD_MSG, MSG, True)
|
|
||||||
EgtSetInfo(nPartId, ITG_PROD_ROT, ROT, True)
|
|
||||||
m_PartM.nCALC_ERR = ERR
|
|
||||||
m_PartM.nCALC_ROT = ROT
|
|
||||||
m_PartM.sCALC_MSG = MSG
|
|
||||||
If ERR = 0 Then
|
|
||||||
nCALC_State = CalcStates.OK
|
|
||||||
ElseIf ERR = 17 Then
|
|
||||||
nCALC_State = CalcStates.WARNING
|
|
||||||
ElseIf ERR > 0 Then
|
|
||||||
nCALC_State = CalcStates.ERROR_
|
|
||||||
ElseIf ERR < 0 Then
|
|
||||||
nCALC_State = CalcStates.INFO
|
|
||||||
End If
|
|
||||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub ResetCalcPart()
|
|
||||||
EgtRemoveInfo(nPartId, ITG_PROD_ERR)
|
|
||||||
EgtRemoveInfo(nPartId, ITG_PROD_MSG)
|
|
||||||
EgtRemoveInfo(nPartId, ITG_PROD_ROT)
|
|
||||||
EgtRemoveInfo(nPartId, ITG_PROD_FALL)
|
|
||||||
m_PartM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
|
||||||
m_PartM.nCALC_State = CalcStates.NOTCALCULATED
|
|
||||||
m_PartM.nCALC_GlobalERR = 0
|
|
||||||
m_PartM.nCALC_ERR = 0
|
|
||||||
m_PartM.nCALC_ROT = 0
|
|
||||||
m_PartM.nCALC_FALL = 0
|
|
||||||
m_PartM.sCALC_MSG = ""
|
|
||||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
|
||||||
ParentMachGroupVM.ResetCalcMachGroup()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub CalcFallUpdate(FALL As Integer)
|
|
||||||
EgtSetInfo(nPartId, ITG_PROD_FALL, FALL, True)
|
|
||||||
m_PartM.nCALC_FALL = 0
|
|
||||||
NotifyPropertyChanged(NameOf(nCALC_FALL))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
|
||||||
Public Sub CalcGlobalUpdate()
|
|
||||||
m_PartM.nCALC_GlobalState = nCALC_State
|
|
||||||
For Each Feature In FeatureVMList
|
|
||||||
If Not Feature.bDO Then
|
|
||||||
ElseIf Feature.nState = CalcStates.NOTCALCULATED Then
|
|
||||||
m_PartM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
|
||||||
Exit For
|
|
||||||
ElseIf Feature.nState = CalcStates.INFO And m_PartM.nCALC_GlobalState = CalcStates.OK Then
|
|
||||||
m_PartM.nCALC_GlobalState = CalcStates.INFO
|
|
||||||
ElseIf Feature.nState = CalcStates.WARNING And (m_PartM.nCALC_GlobalState = CalcStates.OK Or m_PartM.nCALC_GlobalState = CalcStates.INFO) Then
|
|
||||||
m_PartM.nCALC_GlobalState = CalcStates.WARNING
|
|
||||||
ElseIf Feature.nState = CalcStates.ERROR_ And (m_PartM.nCALC_GlobalState = CalcStates.OK Or m_PartM.nCALC_GlobalState = CalcStates.INFO Or m_PartM.nCALC_GlobalState = CalcStates.WARNING) Then
|
|
||||||
m_PartM.nCALC_GlobalState = CalcStates.ERROR_
|
|
||||||
End If
|
|
||||||
If Feature.nCALC_ERR = 22 Then
|
|
||||||
m_PartM.nCALC_GlobalERR = 22
|
|
||||||
ElseIf Feature.nCALC_ERR > 0 And m_PartM.nCALC_GlobalERR <= 0 Then
|
|
||||||
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
|
||||||
ElseIf Feature.nCALC_ERR < 0 And m_PartM.nCALC_GlobalERR = 0 Then
|
|
||||||
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
#Region "DeletePart"
|
|
||||||
|
|
||||||
' Returns a command that manage the MainWindow_Unloaded command
|
|
||||||
Public ReadOnly Property DeletePart_Command() As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdDeletePart Is Nothing Then
|
|
||||||
m_cmdDeletePart = New Command(AddressOf DeletePart)
|
|
||||||
End If
|
|
||||||
Return m_cmdDeletePart
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
|
||||||
Public Overridable Sub DeletePart()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' DeletePart
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
|
||||||
|
|
||||||
#Region "EVENTS"
|
|
||||||
|
|
||||||
Private Sub OnBTLFeatureAdded(sender As Object, e As BTLFeatureAddedEventArgs)
|
|
||||||
Dim BTLFeatureVM As BTLFeatureVM = New BTLFeatureVM(e.NewBTLFeature)
|
|
||||||
FeatureVMList.Add(BTLFeatureVM)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnBTLFeatureVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
|
||||||
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
|
||||||
For Each BTLFeatureVM As BTLFeatureVM In e.NewItems
|
|
||||||
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
|
||||||
For Each BTLFeatureVM As BTLFeatureVM In e.OldItems
|
|
||||||
RemoveHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnBTLFeatureVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
|
||||||
'Select Case e.PropertyName
|
|
||||||
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
|
||||||
'End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.Collections.Specialized
|
|
||||||
Imports System.ComponentModel
|
|
||||||
Imports System.IO
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class WallMachGroupVM
|
|
||||||
Inherits MyMachGroupVM
|
|
||||||
|
|
||||||
Public ReadOnly Property m_WallMachGroupM As WallMachGroupM
|
|
||||||
Get
|
|
||||||
Return m_MachGroupM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
|
||||||
|
|
||||||
Sub New(WallMachGroupM As WallMachGroupM)
|
|
||||||
MyBase.New(WallMachGroupM)
|
|
||||||
AddHandler m_WallMachGroupM.PartAdded, AddressOf OnWallAdded
|
|
||||||
AddHandler m_WallMachGroupM.PartRemoved, AddressOf OnWallRemoved
|
|
||||||
CreateWallVMList()
|
|
||||||
' Aggiorno stato da stati feature
|
|
||||||
CalcGlobalUpdate()
|
|
||||||
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Private Sub CreateWallVMList()
|
|
||||||
Dim all As List(Of WallVM) = (From WallM In m_WallMachGroupM.GetParts()
|
|
||||||
Select New WallVM(WallM, Me)).ToList()
|
|
||||||
|
|
||||||
For Each WallVM As WallVM In all
|
|
||||||
AddHandler WallVM.PropertyChanged, AddressOf OnWallVMPropertyChanged
|
|
||||||
Next
|
|
||||||
|
|
||||||
m_PartVMList = New ObservableCollection(Of PartVM)(all)
|
|
||||||
AddHandler m_PartVMList.CollectionChanged, AddressOf OnWallVMListChanged
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
Public Overrides Sub RefreshPartList()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Overrides Sub RefreshGroupData()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
|
||||||
|
|
||||||
#Region "EVENTS"
|
|
||||||
|
|
||||||
Private Sub OnWallAdded(sender As Object, e As PartAddedEventArgs)
|
|
||||||
Dim WallVM As WallVM = New WallVM(e.NewPart, Me)
|
|
||||||
PartVMList.Add(WallVM)
|
|
||||||
End Sub
|
|
||||||
Private Sub OnWallRemoved(sender As Object, e As PartAddedEventArgs)
|
|
||||||
Dim WallVM As WallVM = PartVMList.FirstOrDefault(Function(x) x.PartM Is e.m_NewPart)
|
|
||||||
If Not IsNothing(WallVM) Then PartVMList.Remove(WallVM)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnWallVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
|
||||||
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
|
||||||
For Each WallVM As WallVM In e.NewItems
|
|
||||||
AddHandler WallVM.PropertyChanged, AddressOf OnWallVMPropertyChanged
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
|
||||||
For Each WallVM As WallVM In e.OldItems
|
|
||||||
RemoveHandler WallVM.PropertyChanged, AddressOf OnWallVMPropertyChanged
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OnWallVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
|
||||||
'Select Case e.PropertyName
|
|
||||||
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
|
||||||
'End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Windows.Input
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class WallVM
|
|
||||||
Inherits PartVM
|
|
||||||
|
|
||||||
Public ReadOnly Property m_WallM As WallM
|
|
||||||
Get
|
|
||||||
Return m_PartM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overrides Property sPOSX As String
|
|
||||||
Get
|
|
||||||
Return LenToString(m_WallM.dPOSX, 3)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
StringToLen(value, m_WallM.dPOSX)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Property sPOSY As String
|
|
||||||
Get
|
|
||||||
Return LenToString(m_WallM.dPOSY, 3)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
StringToLen(value, m_WallM.dPOSY)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property sROT As String
|
|
||||||
Get
|
|
||||||
Return LenToString(m_WallM.dROT, 3) & "°"
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
StringToLen(value, m_WallM.dROT)
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Property bFLIP As Boolean
|
|
||||||
Get
|
|
||||||
Return m_WallM.bFLIP
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_WallM.bFLIP = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
|
||||||
|
|
||||||
Sub New(WallM As WallM, ParentMachGroupVM As WallMachGroupVM)
|
|
||||||
MyBase.New(WallM, ParentMachGroupVM)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
|
||||||
|
|
||||||
End Class
|
|
||||||
+7
-8
@@ -11,7 +11,6 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System
|
|
||||||
|
|
||||||
Namespace My.Resources
|
Namespace My.Resources
|
||||||
|
|
||||||
@@ -22,10 +21,10 @@ Namespace My.Resources
|
|||||||
'''<summary>
|
'''<summary>
|
||||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
|
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||||
Friend Module Resources
|
Friend Module Resources
|
||||||
|
|
||||||
Private resourceMan As Global.System.Resources.ResourceManager
|
Private resourceMan As Global.System.Resources.ResourceManager
|
||||||
@@ -35,7 +34,7 @@ Namespace My.Resources
|
|||||||
'''<summary>
|
'''<summary>
|
||||||
''' Returns the cached ResourceManager instance used by this class.
|
''' Returns the cached ResourceManager instance used by this class.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||||
Get
|
Get
|
||||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||||
@@ -50,12 +49,12 @@ Namespace My.Resources
|
|||||||
''' Overrides the current thread's CurrentUICulture property for all
|
''' Overrides the current thread's CurrentUICulture property for all
|
||||||
''' resource lookups using this strongly typed resource class.
|
''' resource lookups using this strongly typed resource class.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||||
Get
|
Get
|
||||||
Return resourceCulture
|
Return resourceCulture
|
||||||
End Get
|
End Get
|
||||||
Set
|
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||||
resourceCulture = value
|
resourceCulture = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|||||||
+20
-20
@@ -14,26 +14,26 @@ Option Explicit On
|
|||||||
|
|
||||||
Namespace My
|
Namespace My
|
||||||
|
|
||||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
|
||||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Partial Friend NotInheritable Class MySettings
|
Partial Friend NotInheritable Class MySettings
|
||||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
||||||
|
|
||||||
#Region "My.Settings Auto-Save Functionality"
|
#Region "My.Settings Auto-Save Functionality"
|
||||||
#If _MyType = "WindowsForms" Then
|
#If _MyType = "WindowsForms" Then
|
||||||
Private Shared addedHandler As Boolean
|
Private Shared addedHandler As Boolean
|
||||||
|
|
||||||
Private Shared addedHandlerLockObject As New Object
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||||
If My.Application.SaveMySettingsOnExit Then
|
If My.Application.SaveMySettingsOnExit Then
|
||||||
My.Settings.Save()
|
My.Settings.Save()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End If
|
#End If
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -41,14 +41,14 @@ Namespace My
|
|||||||
Get
|
Get
|
||||||
|
|
||||||
#If _MyType = "WindowsForms" Then
|
#If _MyType = "WindowsForms" Then
|
||||||
If Not addedHandler Then
|
If Not addedHandler Then
|
||||||
SyncLock addedHandlerLockObject
|
SyncLock addedHandlerLockObject
|
||||||
If Not addedHandler Then
|
If Not addedHandler Then
|
||||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||||
addedHandler = True
|
addedHandler = True
|
||||||
End If
|
End If
|
||||||
End SyncLock
|
End SyncLock
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
Return defaultInstance
|
Return defaultInstance
|
||||||
End Get
|
End Get
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
<EgtWPFLib5:EgtCustomWindow x:Class="OpenProjectFileDialogV"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
|
||||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
|
||||||
Title="{Binding Title}"
|
|
||||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
|
||||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
|
||||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
|
||||||
Height="500" Width="500" Topmost="True"
|
|
||||||
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
|
||||||
|
|
||||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
|
||||||
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
|
|
||||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
|
||||||
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="5*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<StackPanel>
|
|
||||||
<Grid Grid.Row="0" Margin="5">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1*" />
|
|
||||||
<RowDefinition Height="1*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Text="{Binding FilterType_Msg}"
|
|
||||||
Grid.Row="0" Grid.Column="0"
|
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
|
||||||
<ComboBox ItemsSource="{Binding SearchColumnList}"
|
|
||||||
SelectedItem="{Binding SelSearchColumn}"
|
|
||||||
Width="Auto"
|
|
||||||
Margin="5"
|
|
||||||
Grid.Row="0" Grid.Column="1"
|
|
||||||
Style="{StaticResource FeatureComboBox}"/>
|
|
||||||
<TextBlock Text="{Binding Search_Msg}"
|
|
||||||
Margin="0,5,0,0"
|
|
||||||
Grid.Row="1" Grid.Column="0"
|
|
||||||
Style="{StaticResource OptionTextBlock}"/>
|
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding SearchText}"
|
|
||||||
Margin="5"
|
|
||||||
Grid.Row="1" Grid.Column="1"
|
|
||||||
Visibility="{Binding SearchText_Visibility}"/>
|
|
||||||
<Calendar SelectedDatesChanged="Calendar_SelectedDatesChanged"
|
|
||||||
SelectionMode="MultipleRange"
|
|
||||||
Grid.Row="1" Grid.Column="1"
|
|
||||||
Visibility="{Binding SearchDate_Visibility}"/>
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
|
||||||
ItemsSource="{Binding ProjectList}"
|
|
||||||
SelectedItem="{Binding SelProject}"
|
|
||||||
CanUserAddRows="False"
|
|
||||||
AutoGenerateColumns="False"
|
|
||||||
CanUserResizeRows="False"
|
|
||||||
SelectionMode="Single"
|
|
||||||
ScrollViewer.CanContentScroll="True"
|
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
|
||||||
Margin="5"
|
|
||||||
BindingColumns="{Binding ProjectColumns}">
|
|
||||||
<DataGrid.Resources>
|
|
||||||
<!-- ProjId -->
|
|
||||||
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}">
|
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<!-- ProdId -->
|
|
||||||
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
|
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<!-- BTL FileName -->
|
|
||||||
<DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}">
|
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<!-- ListName -->
|
|
||||||
<DataGridTextColumn x:Key="colLISTNAME" Binding="{Binding sListName}">
|
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Path=DataContext.ListName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<!-- Exported date -->
|
|
||||||
<DataGridTextColumn x:Key="colEXPDATE" Binding="{Binding dtExportDate}">
|
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Path=DataContext.ExportDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<!-- Creation date -->
|
|
||||||
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
|
|
||||||
<DataGridTextColumn.Header>
|
|
||||||
<TextBlock Text="{Binding Path=DataContext.CreateDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
||||||
</DataGridTextColumn.Header>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<!-- Name (per Prod) -->
|
|
||||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
|
||||||
<DataGridTextColumn.Header>
|
|
||||||
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
|
||||||
</DataGridTextColumn.Header>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<!-- Delete -->
|
|
||||||
<!--
|
|
||||||
<DataGridTemplateColumn x:Key="colDELETE"
|
|
||||||
Width="Auto"
|
|
||||||
IsReadOnly="True">
|
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Button Content="X"
|
|
||||||
Command="{Binding Delete_Command}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
|
||||||
</DataGridTemplateColumn>-->
|
|
||||||
</DataGrid.Resources>
|
|
||||||
<!--<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding OpenFileName}"
|
|
||||||
Padding="4,1,4,1">
|
|
||||||
<TextBlock.InputBindings>
|
|
||||||
<MouseBinding MouseAction="LeftDoubleClick"
|
|
||||||
Command="{Binding DataContext.ProjectDoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
|
||||||
CommandParameter="{Binding nProjId}" />
|
|
||||||
</TextBlock.InputBindings>
|
|
||||||
</TextBlock>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>-->
|
|
||||||
<DataGrid.RowStyle>
|
|
||||||
<Style TargetType="DataGridRow">
|
|
||||||
<EventSetter Event="MouseDoubleClick" Handler="ProjectList_MouseDoubleClick"/>
|
|
||||||
</Style>
|
|
||||||
</DataGrid.RowStyle>
|
|
||||||
</EgtBEAMWALL:EgtDataGrid>
|
|
||||||
|
|
||||||
<!--<ListBox Grid.Row="0"
|
|
||||||
ItemsSource="{Binding ProjectList}"
|
|
||||||
SelectedItem="{Binding SelProject}"
|
|
||||||
Margin="5">
|
|
||||||
-->
|
|
||||||
<!--<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding ProjFileName}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>-->
|
|
||||||
<!--
|
|
||||||
<ListBox.ItemContainerStyle>
|
|
||||||
<Style TargetType="ListBoxItem">
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
|
|
||||||
<Setter Property="Padding" Value="0"></Setter>
|
|
||||||
</Style>
|
|
||||||
</ListBox.ItemContainerStyle>
|
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding OpenFileName}"
|
|
||||||
Padding="4,1,4,1">
|
|
||||||
<TextBlock.InputBindings>
|
|
||||||
<MouseBinding MouseAction="LeftDoubleClick"
|
|
||||||
Command="{Binding DataContext.ProjectDoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
|
||||||
CommandParameter="{Binding nProjId}" />
|
|
||||||
</TextBlock.InputBindings>
|
|
||||||
</TextBlock>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>
|
|
||||||
</ListBox>-->
|
|
||||||
|
|
||||||
|
|
||||||
<UniformGrid Columns="3" Grid.Row="2" Margin="0,0,0,5">
|
|
||||||
<Button IsDefault="True" Name="OpenBtn"
|
|
||||||
Content="{Binding Open_Msg}" Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
|
||||||
<Button Content="{Binding Delete_Msg}"
|
|
||||||
Command="{Binding Delete_Command}"
|
|
||||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
|
||||||
<Button IsCancel="True"
|
|
||||||
Content="{Binding Cancel_Msg}"
|
|
||||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</EgtWPFLib5:EgtCustomWindow>
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
Imports System.ComponentModel
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Windows
|
|
||||||
Imports System.Windows.Controls
|
|
||||||
Imports System.Windows.Input
|
|
||||||
Imports EgtBEAMWALL.Core.ConstBeam
|
|
||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class OpenProjectFileDialogV
|
|
||||||
|
|
||||||
Private WithEvents m_OpenProjFileDialogVM As OpenProjectFileDialogVM
|
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
|
||||||
|
|
||||||
Sub New(Owner As Window, OpenProjFileDialogVM As OpenProjectFileDialogVM)
|
|
||||||
' Funzione che interpreta l'xaml
|
|
||||||
InitializeComponent()
|
|
||||||
Me.Owner = Owner
|
|
||||||
Me.DataContext = OpenProjFileDialogVM
|
|
||||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
|
||||||
m_OpenProjFileDialogVM = OpenProjFileDialogVM
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Public Function EgtShowDialog(ProjectType As ProjectType) As Boolean?
|
|
||||||
m_OpenProjFileDialogVM.Init(ProjectType)
|
|
||||||
' mostro la finestra di dialogo
|
|
||||||
Return Me.ShowDialog()
|
|
||||||
End Function
|
|
||||||
Public Function EgtShowDialog(ProjectType As ProjectType, ProjectList As List(Of ProjectFileVM)) As Boolean?
|
|
||||||
m_OpenProjFileDialogVM.Init(ProjectType, ProjectList)
|
|
||||||
' mostro la finestra di dialogo
|
|
||||||
Return Me.ShowDialog()
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
#Region "EVENTS"
|
|
||||||
|
|
||||||
Private Sub ProjectList_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
|
||||||
m_OpenProjFileDialogVM.ProjDoubleClick()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' EVENTS
|
|
||||||
|
|
||||||
Private Sub OpenBtn_Click(sender As Object, e As RoutedEventArgs) Handles OpenBtn.Click
|
|
||||||
DialogResult = m_OpenProjFileDialogVM.VerifySelected()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_OpenProjFileDialogVM.m_CloseWindow
|
|
||||||
Me.DialogResult = bDialogResult
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub Calendar_SelectedDatesChanged(sender As Object, e As SelectionChangedEventArgs)
|
|
||||||
Dim cal As System.Windows.Controls.Calendar = sender
|
|
||||||
m_OpenProjFileDialogVM.m_SearchDate = cal.SelectedDates
|
|
||||||
m_OpenProjFileDialogVM.m_ProjectList_View.Refresh()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,355 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Windows
|
|
||||||
Imports System.Windows.Controls
|
|
||||||
Imports System.Windows.Data
|
|
||||||
Imports System.Windows.Input
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtBEAMWALL.Core.ConstBeam
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public MustInherit Class OpenProjectFileDialogVM
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
|
||||||
|
|
||||||
Protected m_ProjectColumns As New ObservableCollection(Of EgtDataGridColumn)
|
|
||||||
Public Property ProjectColumns As ObservableCollection(Of EgtDataGridColumn)
|
|
||||||
Get
|
|
||||||
Return m_ProjectColumns
|
|
||||||
End Get
|
|
||||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
|
||||||
m_ProjectColumns = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_ProjectType As ProjectType
|
|
||||||
|
|
||||||
Protected m_sFilter As String
|
|
||||||
Public Property Filter As String
|
|
||||||
Get
|
|
||||||
Return m_sFilter
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_sFilter = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_sFileNameFilter As Predicate(Of String)
|
|
||||||
Public Property FileNameFilter As Predicate(Of String)
|
|
||||||
Get
|
|
||||||
Return m_sFileNameFilter
|
|
||||||
End Get
|
|
||||||
Set(value As Predicate(Of String))
|
|
||||||
m_sFileNameFilter = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_sExtensions As New List(Of String)
|
|
||||||
Public ReadOnly Property Extensions As List(Of String)
|
|
||||||
Get
|
|
||||||
Return m_sExtensions
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public m_ProjectList_View As CollectionView = Nothing
|
|
||||||
Protected m_ProjectList As New ObservableCollection(Of ProjectFileVM)
|
|
||||||
Public ReadOnly Property ProjectList As ObservableCollection(Of ProjectFileVM)
|
|
||||||
Get
|
|
||||||
Return m_ProjectList
|
|
||||||
End Get
|
|
||||||
'Set(value As List(Of ProjFile))
|
|
||||||
' m_ProjList = value
|
|
||||||
' NotifyPropertyChanged("ProjList")
|
|
||||||
'End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_SelProject As ProjectFileVM
|
|
||||||
Public Property SelProject As ProjectFileVM
|
|
||||||
Get
|
|
||||||
Return m_SelProject
|
|
||||||
End Get
|
|
||||||
Set(value As ProjectFileVM)
|
|
||||||
m_SelProject = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_FileName As String
|
|
||||||
Public Property FileName As String
|
|
||||||
Get
|
|
||||||
Return m_FileName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_FileName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' lista campi per ricerca testuale e con datepicker
|
|
||||||
Protected m_SearchColumnList As New ObservableCollection(Of IdNameStruct)
|
|
||||||
Public ReadOnly Property SearchColumnList As ObservableCollection(Of IdNameStruct)
|
|
||||||
Get
|
|
||||||
Return m_SearchColumnList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_SelSearchColumn As IdNameStruct = Nothing
|
|
||||||
Public Property SelSearchColumn As IdNameStruct
|
|
||||||
Get
|
|
||||||
Return m_SelSearchColumn
|
|
||||||
End Get
|
|
||||||
Set(value As IdNameStruct)
|
|
||||||
' resetto il contenuto della barra di ricerca testuale
|
|
||||||
m_SearchText = ""
|
|
||||||
NotifyPropertyChanged(NameOf(SearchText))
|
|
||||||
' resetto le selezioni sul calendario
|
|
||||||
If Not IsNothing(SearchDate) Then SearchDate.Clear()
|
|
||||||
' setto il Tipo Filtro a NULL e refresho la lista dei progetti (in modo da averli visibili tutti)
|
|
||||||
m_SelSearchColumn = m_SearchColumnList(0)
|
|
||||||
m_ProjectList_View.Refresh()
|
|
||||||
' ora setto il valore scelto come Tipo Filtro
|
|
||||||
m_SelSearchColumn = value
|
|
||||||
Select Case m_SelSearchColumn.Id
|
|
||||||
Case OpenProjFileColumn.ID, OpenProjFileColumn.BTLFILENAME, OpenProjFileColumn.LISTNAME
|
|
||||||
SearchText_Visibility = Visibility.Visible
|
|
||||||
SearchDate_Visibility = Visibility.Collapsed
|
|
||||||
Case OpenProjFileColumn.EXPORTDATE, OpenProjFileColumn.CREATEDATE
|
|
||||||
SearchText_Visibility = Visibility.Collapsed
|
|
||||||
SearchDate_Visibility = Visibility.Visible
|
|
||||||
Case Else
|
|
||||||
SearchText_Visibility = Visibility.Collapsed
|
|
||||||
SearchDate_Visibility = Visibility.Collapsed
|
|
||||||
End Select
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_SearchText As String = ""
|
|
||||||
Public Property SearchText As String
|
|
||||||
Get
|
|
||||||
Return m_SearchText
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_SearchText = value
|
|
||||||
m_ProjectList_View.Refresh()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Friend m_SearchDate As SelectedDatesCollection = Nothing
|
|
||||||
Public ReadOnly Property SearchDate As SelectedDatesCollection
|
|
||||||
Get
|
|
||||||
Return m_SearchDate
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_SearchText_Visibility As Visibility = Visibility.Collapsed
|
|
||||||
Public Property SearchText_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return m_SearchText_Visibility
|
|
||||||
End Get
|
|
||||||
Set(value As Visibility)
|
|
||||||
m_SearchText_Visibility = value
|
|
||||||
NotifyPropertyChanged(NameOf(SearchText_Visibility))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_SearchDate_Visibility As Visibility = Visibility.Collapsed
|
|
||||||
Public Property SearchDate_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return m_SearchDate_Visibility
|
|
||||||
End Get
|
|
||||||
Set(value As Visibility)
|
|
||||||
m_SearchDate_Visibility = value
|
|
||||||
NotifyPropertyChanged(NameOf(SearchDate_Visibility))
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Enum OpenProjFileColumn As Integer
|
|
||||||
NULL = 0
|
|
||||||
ID = 1
|
|
||||||
BTLFILENAME = 2
|
|
||||||
LISTNAME = 3
|
|
||||||
EXPORTDATE = 4
|
|
||||||
CREATEDATE = 5
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
#Region "Messages"
|
|
||||||
|
|
||||||
Public ReadOnly Property FilterType_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61836)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property Search_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61837)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property Id_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61815)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property BTLFileName_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61819)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property ListName_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61820)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property ExportDate_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61821)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property CreateDate_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61822)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property Name_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61808)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property Open_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(30006)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property Delete_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61823)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property Cancel_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(30002)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
' Definizione comandi
|
|
||||||
Private m_cmdProjectDoubleClick As ICommand
|
|
||||||
Private m_cmdDelete As ICommand
|
|
||||||
|
|
||||||
Public MustOverride Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing) As Boolean?
|
|
||||||
|
|
||||||
Protected Sub LoadColumns(ProjectType As ProjectType)
|
|
||||||
If ProjectType = ProjectType.PROJ Then
|
|
||||||
' carico le colonne della datagrid
|
|
||||||
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROJ, ProjectColumns)
|
|
||||||
' carico campi su cui eseguire il filtro di ricerca
|
|
||||||
m_SearchColumnList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(OpenProjFileColumn.NULL, ""),
|
|
||||||
New IdNameStruct(OpenProjFileColumn.ID, Id_Msg),
|
|
||||||
New IdNameStruct(OpenProjFileColumn.BTLFILENAME, BTLFileName_Msg),
|
|
||||||
New IdNameStruct(OpenProjFileColumn.LISTNAME, ListName_Msg),
|
|
||||||
New IdNameStruct(OpenProjFileColumn.EXPORTDATE, ExportDate_Msg),
|
|
||||||
New IdNameStruct(OpenProjFileColumn.CREATEDATE, CreateDate_Msg)})
|
|
||||||
ElseIf ProjectType = ProjectType.PROD Then
|
|
||||||
' carico le colonne della datagrid
|
|
||||||
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROD, ProjectColumns)
|
|
||||||
' carico campi su cui eseguire il filtro di ricerca
|
|
||||||
m_SearchColumnList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(OpenProjFileColumn.NULL, ""),
|
|
||||||
New IdNameStruct(OpenProjFileColumn.ID, Id_Msg),
|
|
||||||
New IdNameStruct(OpenProjFileColumn.BTLFILENAME, BTLFileName_Msg),
|
|
||||||
New IdNameStruct(OpenProjFileColumn.CREATEDATE, CreateDate_Msg)})
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Function VerifySelected() As Boolean
|
|
||||||
If IsNothing(SelProject) Then Return False
|
|
||||||
Dim AllFilesInDir As IEnumerable(Of String)
|
|
||||||
If m_ProjectType = Core.ConstBeam.ProjectType.PROJ Then
|
|
||||||
' verifico se esiste ProdId
|
|
||||||
AllFilesInDir = IO.Directory.EnumerateFiles(SelProject.sProjDirPath)
|
|
||||||
ElseIf m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
|
|
||||||
AllFilesInDir = IO.Directory.EnumerateFiles(SelProject.sProdDirPath)
|
|
||||||
End If
|
|
||||||
For Each File In AllFilesInDir
|
|
||||||
If Path.GetExtension(File).ToLower() = ".nge" Then
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Return False
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Protected Function ProjectFilter(Proj As Object) As Boolean
|
|
||||||
Dim bProjectOk As Boolean = True
|
|
||||||
If m_ProjectType = ProjectType.PROJ Then
|
|
||||||
Dim CurrProj As ProjFileVM = DirectCast(Proj, ProjFileVM)
|
|
||||||
If m_SelSearchColumn.Id <> OpenProjFileColumn.NULL AndAlso (
|
|
||||||
(m_SelSearchColumn.Id = OpenProjFileColumn.EXPORTDATE AndAlso Not SearchDate.Contains(CurrProj.dtExportDate.Date)) OrElse
|
|
||||||
(m_SelSearchColumn.Id = OpenProjFileColumn.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
|
||||||
If m_SelSearchColumn.Id <> OpenProjFileColumn.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
|
||||||
(m_SelSearchColumn.Id = OpenProjFileColumn.ID AndAlso CurrProj.sProjId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
|
||||||
(m_SelSearchColumn.Id = OpenProjFileColumn.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
|
||||||
(m_SelSearchColumn.Id = OpenProjFileColumn.LISTNAME AndAlso CurrProj.sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
|
||||||
ElseIf m_ProjectType = ProjectType.PROD Then
|
|
||||||
Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
|
|
||||||
If m_SelSearchColumn.Id <> OpenProjFileColumn.NULL AndAlso (
|
|
||||||
(m_SelSearchColumn.Id = OpenProjFileColumn.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
|
||||||
If m_SelSearchColumn.Id <> OpenProjFileColumn.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
|
||||||
(m_SelSearchColumn.Id = OpenProjFileColumn.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
|
||||||
(m_SelSearchColumn.Id = OpenProjFileColumn.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
|
||||||
End If
|
|
||||||
Return bProjectOk
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
#Region "ProjectDoubleClick"
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Returns a command that do New.
|
|
||||||
''' </summary>
|
|
||||||
Public ReadOnly Property ProjectDoubleClick_Command As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdProjectDoubleClick Is Nothing Then
|
|
||||||
m_cmdProjectDoubleClick = New Command(AddressOf ProjDoubleClick)
|
|
||||||
End If
|
|
||||||
Return m_cmdProjectDoubleClick
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Execute the New. This method is invoked by the NewCommand.
|
|
||||||
''' </summary>
|
|
||||||
Friend Sub ProjDoubleClick()
|
|
||||||
If VerifySelected() Then
|
|
||||||
RaiseEvent m_CloseWindow(True)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' ProjectDoubleClick
|
|
||||||
|
|
||||||
#Region "Delete"
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Returns a command that do New.
|
|
||||||
''' </summary>
|
|
||||||
Public ReadOnly Property Delete_Command As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdDelete Is Nothing Then
|
|
||||||
m_cmdDelete = New Command(AddressOf Delete)
|
|
||||||
End If
|
|
||||||
Return m_cmdDelete
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Execute the New. This method is invoked by the NewCommand.
|
|
||||||
''' </summary>
|
|
||||||
Friend Overridable Sub Delete()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' Delete
|
|
||||||
|
|
||||||
#End Region ' Commands
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -2,41 +2,55 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class ProdFileM
|
Public Class ProdFileM
|
||||||
Inherits ProjectFileM
|
Inherits ProjectFileM
|
||||||
|
|
||||||
Protected m_nProjIdList As List(Of Integer)
|
#Region "Protected Fields"
|
||||||
Public ReadOnly Property nProjIdList As List(Of Integer)
|
|
||||||
Get
|
|
||||||
Return m_nProjIdList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_sName As String
|
Protected m_nProjIdList As List(Of Integer)
|
||||||
Public ReadOnly Property sName As String
|
Protected m_sName As String
|
||||||
Get
|
|
||||||
Return m_sName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
#End Region
|
||||||
|
|
||||||
Protected Sub New()
|
#Region "Protected Constructors"
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Shared Function CreateNewProdFileM() As ProdFileM
|
Protected Sub New()
|
||||||
Return New ProdFileM
|
End Sub
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Shared Function CreateProdFileM(nProdId As Integer, nProjIdList As List(Of Integer),
|
#End Region
|
||||||
dtCreateProjDate As DateTime, sName As String) As ProdFileM
|
|
||||||
Dim NewProjectFileM As New ProdFileM
|
|
||||||
NewProjectFileM.m_nProdId = nProdId
|
|
||||||
NewProjectFileM.m_nProjIdList = nProjIdList
|
|
||||||
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
|
||||||
NewProjectFileM.m_sName = sName
|
|
||||||
Return NewProjectFileM
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
#Region "Public Properties"
|
||||||
|
|
||||||
|
Public ReadOnly Property nProjIdList As List(Of Integer)
|
||||||
|
Get
|
||||||
|
Return m_nProjIdList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Public Methods"
|
||||||
|
|
||||||
|
Public Shared Function CreateNewProdFileM() As ProdFileM
|
||||||
|
Return New ProdFileM
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CreateProdFileM(nProdId As Integer, nProjIdList As List(Of Integer), dtCreateProjDate As DateTime, sName As String, nType As BWType) As ProdFileM
|
||||||
|
Dim NewProjectFileM As New ProdFileM
|
||||||
|
NewProjectFileM.m_nProdId = nProdId
|
||||||
|
NewProjectFileM.m_nProjIdList = nProjIdList
|
||||||
|
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
||||||
|
NewProjectFileM.m_sName = sName
|
||||||
|
NewProjectFileM.m_nType = nType
|
||||||
|
|
||||||
|
Return NewProjectFileM
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -2,55 +2,71 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class ProjFileM
|
Public Class ProjFileM
|
||||||
Inherits ProjectFileM
|
Inherits ProjectFileM
|
||||||
|
|
||||||
Protected m_dtExportDate As DateTime
|
#Region "Protected Fields"
|
||||||
Public ReadOnly Property dtExportDate As DateTime
|
|
||||||
Get
|
|
||||||
Return m_dtExportDate
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_sListName As String
|
Protected m_dtExportDate As DateTime
|
||||||
Public ReadOnly Property sListName As String
|
Protected m_sBTLFileName As String = String.Empty
|
||||||
Get
|
|
||||||
Return m_sListName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_sBTLFileName As String = String.Empty
|
Protected m_sListName As String
|
||||||
Public Property sBTLFileName As String
|
|
||||||
Get
|
|
||||||
Return m_sBTLFileName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_sBTLFileName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
#End Region
|
||||||
|
|
||||||
Protected Sub New()
|
#Region "Protected Constructors"
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Shared Function CreateNewProjFileM() As ProjFileM
|
Protected Sub New()
|
||||||
Return New ProjFileM
|
End Sub
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Shared Function CreateProjFileM(nProjId As Integer, nProdId As Integer, dtCreateProjDate As DateTime,
|
#End Region
|
||||||
dtExportDate As DateTime, sListName As String, sBTLFileName As String, IsNew As Boolean, IsLocked As Boolean) As ProjFileM
|
|
||||||
Dim NewProjectFileM As New ProjFileM
|
|
||||||
NewProjectFileM.m_nProjId = nProjId
|
|
||||||
NewProjectFileM.m_nProdId = nProdId
|
|
||||||
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
|
||||||
NewProjectFileM.m_dtExportDate = dtExportDate
|
|
||||||
NewProjectFileM.m_sListName = sListName
|
|
||||||
NewProjectFileM.m_sBTLFileName = sBTLFileName
|
|
||||||
NewProjectFileM.m_bIsNew = IsNew
|
|
||||||
NewProjectFileM.m_bIsLocked = IsLocked
|
|
||||||
Return NewProjectFileM
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
#Region "Public Properties"
|
||||||
|
|
||||||
|
Public ReadOnly Property dtExportDate As DateTime
|
||||||
|
Get
|
||||||
|
Return m_dtExportDate
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sBTLFileName As String
|
||||||
|
Get
|
||||||
|
Return m_sBTLFileName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sBTLFileName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sListName As String
|
||||||
|
Get
|
||||||
|
Return m_sListName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Public Methods"
|
||||||
|
|
||||||
|
Public Shared Function CreateNewProjFileM() As ProjFileM
|
||||||
|
Return New ProjFileM
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CreateProjFileM(nProjId As Integer, nProdId As Integer, dtCreateProjDate As DateTime,
|
||||||
|
dtExportDate As DateTime, sListName As String, sBTLFileName As String, IsNew As Boolean, IsLocked As Boolean, nType As BWType) As ProjFileM
|
||||||
|
Dim NewProjectFileM As New ProjFileM
|
||||||
|
NewProjectFileM.m_nProjId = nProjId
|
||||||
|
NewProjectFileM.m_nProdId = nProdId
|
||||||
|
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
||||||
|
NewProjectFileM.m_dtExportDate = dtExportDate
|
||||||
|
NewProjectFileM.m_sListName = sListName
|
||||||
|
NewProjectFileM.m_sBTLFileName = sBTLFileName
|
||||||
|
NewProjectFileM.m_bIsNew = IsNew
|
||||||
|
NewProjectFileM.m_bIsLocked = IsLocked
|
||||||
|
NewProjectFileM.m_nType = nType
|
||||||
|
|
||||||
|
Return NewProjectFileM
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -3,70 +3,85 @@ Imports EgtUILib
|
|||||||
|
|
||||||
Public Class ProjectFileM
|
Public Class ProjectFileM
|
||||||
|
|
||||||
'Protected m_nProjectType As ProjectType
|
'Protected m_nProjectType As ProjectType
|
||||||
'Public ReadOnly Property nProjectType As ProjectType
|
'Public ReadOnly Property nProjectType As ProjectType
|
||||||
' Get
|
' Get
|
||||||
' Return m_nProjectType
|
' Return m_nProjectType
|
||||||
' End Get
|
' End Get
|
||||||
'End Property
|
'End Property
|
||||||
'Public Sub SetProjectType(nProjectType As ProjectType)
|
'Public Sub SetProjectType(nProjectType As ProjectType)
|
||||||
' m_nProjectType = nProjectType
|
' m_nProjectType = nProjectType
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
Protected m_nProjId As Integer = 0
|
#Region "Protected Fields"
|
||||||
Public ReadOnly Property nProjId As Integer
|
|
||||||
Get
|
|
||||||
Return m_nProjId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_nProdId As Integer = 0
|
Protected m_bIsLocked As Boolean
|
||||||
Public ReadOnly Property nProdId As Integer
|
Protected m_bIsNew As Boolean
|
||||||
Get
|
Protected m_dtCreateDate As DateTime
|
||||||
Return m_nProdId
|
Protected m_nProdId As Integer = 0
|
||||||
End Get
|
Protected m_nProjId As Integer = 0
|
||||||
End Property
|
Protected m_nType As BWType
|
||||||
|
|
||||||
Protected m_dtCreateDate As DateTime
|
#End Region
|
||||||
Public ReadOnly Property dtCreateDate As DateTime
|
|
||||||
Get
|
|
||||||
Return m_dtCreateDate
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_bIsNew As Boolean
|
#Region "Public Properties"
|
||||||
Public Property bIsNew As Boolean
|
|
||||||
Get
|
|
||||||
Return m_bIsNew
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_bIsNew = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Protected m_bIsLocked As Boolean
|
Public Property bIsLocked As Boolean
|
||||||
Public Property bIsLocked As Boolean
|
Get
|
||||||
Get
|
Return m_bIsLocked
|
||||||
Return m_bIsLocked
|
End Get
|
||||||
End Get
|
Set(value As Boolean)
|
||||||
Set(value As Boolean)
|
m_bIsLocked = value
|
||||||
m_bIsLocked = value
|
End Set
|
||||||
End Set
|
End Property
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
Public Property bIsNew As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bIsNew
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_bIsNew = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
'Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
|
Public ReadOnly Property dtCreateDate As DateTime
|
||||||
' m_nProjectType = nProjectType
|
Get
|
||||||
' If m_nProjectType = ProjectType.PROJ Then
|
Return m_dtCreateDate
|
||||||
' m_nProjId = nProjId
|
End Get
|
||||||
' m_nProdId = nProdId
|
End Property
|
||||||
' m_BTLFileName = sBTLFileName
|
|
||||||
' ElseIf m_nProjectType = ProjectType.PROD Then
|
|
||||||
' m_nProdId = nProdId
|
|
||||||
' End If
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
Public ReadOnly Property nProdId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nProdId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nProjId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nProjId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nType As BWType
|
||||||
|
Get
|
||||||
|
Return m_nType
|
||||||
|
End Get
|
||||||
|
Set(value As BWType)
|
||||||
|
m_nType = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
'Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
|
||||||
|
' m_nProjectType = nProjectType
|
||||||
|
' If m_nProjectType = ProjectType.PROJ Then
|
||||||
|
' m_nProjId = nProjId
|
||||||
|
' m_nProdId = nProdId
|
||||||
|
' m_BTLFileName = sBTLFileName
|
||||||
|
' ElseIf m_nProjectType = ProjectType.PROD Then
|
||||||
|
' m_nProdId = nProdId
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
Imports System.IO
|
|
||||||
|
|
||||||
Public Class ProdFile
|
|
||||||
|
|
||||||
'Private m_nProjId As Integer = 0
|
|
||||||
'Public ReadOnly Property nProjId As Integer
|
|
||||||
' Get
|
|
||||||
' Return m_nProjId
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Friend ReadOnly Property sProjPath As String
|
|
||||||
' Get
|
|
||||||
' Dim sPath As String = String.Empty
|
|
||||||
' If IsNothing(m_nProjId) OrElse m_nProjId = 0 Then Return String.Empty
|
|
||||||
' sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR
|
|
||||||
' If Not IsNothing(m_nProdId) AndAlso m_nProdId > 0 Then
|
|
||||||
' sPath &= nProjId.ToString("0000")
|
|
||||||
' End If
|
|
||||||
' sPath &= FILENAMESEPARATOR & BTLFileName & ".nge"
|
|
||||||
' Return sPath
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
Private m_nProdId As Integer = 0
|
|
||||||
Public ReadOnly Property nProdId As Integer
|
|
||||||
Get
|
|
||||||
Return m_nProdId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Friend ReadOnly Property sProdPath As String
|
|
||||||
Get
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If IsNothing(m_nProdId) OrElse m_nProdId = 0 Then Return String.Empty
|
|
||||||
Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
'Private m_BTLFileName As String = String.Empty
|
|
||||||
'Public ReadOnly Property BTLFileName As String
|
|
||||||
' Get
|
|
||||||
' Return m_BTLFileName
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
Private m_NewProd As Boolean
|
|
||||||
Friend Property NewProd As Boolean
|
|
||||||
Get
|
|
||||||
Return m_NewProd
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_NewProd = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property ProjectFileName As String
|
|
||||||
Get
|
|
||||||
Return m_nProdId.ToString("0000")
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New(ProdFileName As String)
|
|
||||||
Integer.TryParse(Path.GetFileNameWithoutExtension(ProdFileName), m_nProdId)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub SetProdId(nProdId As Integer)
|
|
||||||
m_nProdId = nProdId
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
Imports System.IO
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class ProdFileVM
|
|
||||||
Inherits ProjectFileVM
|
|
||||||
|
|
||||||
Public ReadOnly Property ProdFileM As ProdFileM
|
|
||||||
Get
|
|
||||||
Return m_ProjectFileM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property nProjIdList As List(Of Integer)
|
|
||||||
Get
|
|
||||||
Return ProdFileM.nProjIdList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overrides ReadOnly Property nProdId As Integer
|
|
||||||
Get
|
|
||||||
Return ProdFileM.nProdId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overrides ReadOnly Property sProdDirPath As String
|
|
||||||
Get
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If IsNothing(ProdFileM.nProdId) OrElse ProdFileM.nProdId = 0 Then Return String.Empty
|
|
||||||
Return m_sProdsDir & "\" & nProdId.ToString("0000")
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Overrides ReadOnly Property sProdPath As String
|
|
||||||
Get
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If IsNothing(ProdFileM.nProdId) OrElse ProdFileM.nProdId = 0 Then Return String.Empty
|
|
||||||
Return m_sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overrides Property bIsNew As Boolean
|
|
||||||
Get
|
|
||||||
Return ProdFileM.bIsNew
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
ProdFileM.bIsNew = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sName As String
|
|
||||||
Get
|
|
||||||
Return ProdFileM.sName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_sBTLFileName As String
|
|
||||||
Public ReadOnly Property sBTLFileName As String
|
|
||||||
Get
|
|
||||||
Return m_sBTLFileName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Protected Sub SetBTLFileName(value As String)
|
|
||||||
m_sBTLFileName = value
|
|
||||||
End Sub
|
|
||||||
#Region "CONSTRUCTORS"
|
|
||||||
|
|
||||||
Sub New(ProdFileM As ProdFileM)
|
|
||||||
m_ProjectFileM = ProdFileM
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
|
||||||
|
|
||||||
Friend Function GetProjPath(nProjId As Integer)
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If nProjId = 0 Then Return String.Empty
|
|
||||||
Return m_sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge"
|
|
||||||
End Function
|
|
||||||
|
|
||||||
' funzione che restituisce le parti di nome file
|
|
||||||
Friend Shared Function VerifyProjectFile(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
|
|
||||||
If nProjectType = ProjectType.PROJ Then
|
|
||||||
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
|
||||||
If DataFromFileName.Count = 3 Then
|
|
||||||
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
|
||||||
Integer.TryParse(DataFromFileName(0), nProjId)
|
|
||||||
Else Return False
|
|
||||||
End If
|
|
||||||
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
|
||||||
Integer.TryParse(DataFromFileName(1), nProdId)
|
|
||||||
Else
|
|
||||||
nProdId = 0
|
|
||||||
End If
|
|
||||||
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
|
||||||
sBTLFileName = DataFromFileName(2)
|
|
||||||
End If
|
|
||||||
Return True
|
|
||||||
Else Return False
|
|
||||||
End If
|
|
||||||
ElseIf nProjectType = ProjectType.PROD Then
|
|
||||||
Return Integer.TryParse(ProjectFileName, nProdId)
|
|
||||||
Else Return False
|
|
||||||
End If
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
Imports System.IO
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class ProjFileVM
|
|
||||||
Inherits ProjectFileVM
|
|
||||||
|
|
||||||
Public ReadOnly Property ProjFileM As ProjFileM
|
|
||||||
Get
|
|
||||||
Return m_ProjectFileM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overrides ReadOnly Property nProjId As Integer
|
|
||||||
Get
|
|
||||||
Return ProjFileM.nProjId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overrides ReadOnly Property nProdId As Integer
|
|
||||||
Get
|
|
||||||
Return ProjFileM.nProdId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overrides ReadOnly Property sProjDirPath As String
|
|
||||||
Get
|
|
||||||
If IsNothing(ProjFileM.nProjId) OrElse ProjFileM.nProjId = 0 Then Return String.Empty
|
|
||||||
Return m_sProjsDir & "\" & nProjId.ToString("0000")
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Overrides ReadOnly Property sProjPath As String
|
|
||||||
Get
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If IsNothing(ProjFileM.nProjId) OrElse ProjFileM.nProjId = 0 Then Return String.Empty
|
|
||||||
sPath = m_sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge"
|
|
||||||
Return sPath
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overrides ReadOnly Property sProdDirPath As String
|
|
||||||
Get
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If IsNothing(ProjFileM.nProdId) OrElse ProjFileM.nProdId = 0 Then Return String.Empty
|
|
||||||
Return m_sProdsDir & "\" & nProdId.ToString("0000")
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Overrides ReadOnly Property sProdPath As String
|
|
||||||
Get
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If IsNothing(ProjFileM.nProdId) OrElse ProjFileM.nProdId = 0 Then Return String.Empty
|
|
||||||
Return m_sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overrides Property bIsNew As Boolean
|
|
||||||
Get
|
|
||||||
Return ProjFileM.bIsNew
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
ProjFileM.bIsNew = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sBTLFileName As String
|
|
||||||
Get
|
|
||||||
Return ProjFileM.sBTLFileName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property sListName As String
|
|
||||||
Get
|
|
||||||
Return ProjFileM.sListName
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property dtExportDate As DateTime
|
|
||||||
Get
|
|
||||||
Return ProjFileM.dtExportDate
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
|
||||||
|
|
||||||
Sub New(ProjectFileM As ProjFileM)
|
|
||||||
m_ProjectFileM = ProjectFileM
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
|
||||||
|
|
||||||
#Region "METHODS"
|
|
||||||
|
|
||||||
Public Sub SetBTLFileName(BTLFileName As String)
|
|
||||||
ProjFileM.sBTLFileName = BTLFileName
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' funzione che restituisce le parti di nome file
|
|
||||||
Friend Shared Function VerifyProjectFile(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
|
|
||||||
If nProjectType = ProjectType.PROJ Then
|
|
||||||
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
|
||||||
If DataFromFileName.Count = 3 Then
|
|
||||||
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
|
||||||
Integer.TryParse(DataFromFileName(0), nProjId)
|
|
||||||
Else Return False
|
|
||||||
End If
|
|
||||||
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
|
||||||
Integer.TryParse(DataFromFileName(1), nProdId)
|
|
||||||
Else
|
|
||||||
nProdId = 0
|
|
||||||
End If
|
|
||||||
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
|
||||||
sBTLFileName = DataFromFileName(2)
|
|
||||||
End If
|
|
||||||
Return True
|
|
||||||
Else Return False
|
|
||||||
End If
|
|
||||||
ElseIf nProjectType = ProjectType.PROD Then
|
|
||||||
Return Integer.TryParse(ProjectFileName, nProdId)
|
|
||||||
Else Return False
|
|
||||||
End If
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
Imports System.IO
|
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class ProjectFileVM
|
|
||||||
Inherits VMBase
|
|
||||||
|
|
||||||
Protected Shared m_sProjsDir As String
|
|
||||||
Protected Shared m_sProdsDir As String
|
|
||||||
|
|
||||||
Protected m_ProjectFileM As ProjectFileM
|
|
||||||
|
|
||||||
Public Overridable ReadOnly Property nProjId As Integer
|
|
||||||
Get
|
|
||||||
Return m_ProjectFileM.nProjId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Overridable ReadOnly Property sProjId As String
|
|
||||||
Get
|
|
||||||
Return m_ProjectFileM.nProjId.ToString("0000")
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable ReadOnly Property nProdId As Integer
|
|
||||||
Get
|
|
||||||
Return m_ProjectFileM.nProdId
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Overridable ReadOnly Property sProdId As String
|
|
||||||
Get
|
|
||||||
Return m_ProjectFileM.nProdId.ToString("0000")
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable ReadOnly Property sProjDirPath As String
|
|
||||||
Get
|
|
||||||
If IsNothing(m_ProjectFileM.nProjId) OrElse m_ProjectFileM.nProjId = 0 Then Return String.Empty
|
|
||||||
Return m_sProjsDir & "\" & nProjId.ToString("0000")
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Overridable ReadOnly Property sProjPath As String
|
|
||||||
Get
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If IsNothing(m_ProjectFileM.nProjId) OrElse m_ProjectFileM.nProjId = 0 Then Return String.Empty
|
|
||||||
sPath = m_sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge"
|
|
||||||
Return sPath
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable ReadOnly Property sProdDirPath As String
|
|
||||||
Get
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If IsNothing(m_ProjectFileM.nProdId) OrElse m_ProjectFileM.nProdId = 0 Then Return String.Empty
|
|
||||||
Return m_sProdsDir & "\" & nProdId.ToString("0000")
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public Overridable ReadOnly Property sProdPath As String
|
|
||||||
Get
|
|
||||||
Dim sPath As String = String.Empty
|
|
||||||
If IsNothing(m_ProjectFileM.nProdId) OrElse m_ProjectFileM.nProdId = 0 Then Return String.Empty
|
|
||||||
Return m_sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Property bIsNew As Boolean
|
|
||||||
Get
|
|
||||||
Return m_ProjectFileM.bIsNew
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_ProjectFileM.bIsNew = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Overridable Property bIsLocked As Boolean
|
|
||||||
Get
|
|
||||||
Return m_ProjectFileM.bIsLocked
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
m_ProjectFileM.bIsLocked = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property dtCreateDate As DateTime
|
|
||||||
Get
|
|
||||||
Return m_ProjectFileM.dtCreateDate
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' variabile che indica se ricaricare il progetto
|
|
||||||
Private m_bReloadProject As Boolean = True
|
|
||||||
Friend ReadOnly Property bReloadProject As Boolean
|
|
||||||
Get
|
|
||||||
Return m_bReloadProject
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#Region "Messages"
|
|
||||||
|
|
||||||
Public ReadOnly Property Id_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61815)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property BTLFileName_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61819)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property ListName_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61820)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property ExportDate_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61821)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property CreateDate_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61822)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property Name_Msg As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61808)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
#End Region ' Messages
|
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
|
||||||
|
|
||||||
Public Sub SetReloadProject(bValue As Boolean)
|
|
||||||
m_bReloadProject = bValue
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Shared Sub Init(sProjsDir As String, sProdsDir As String)
|
|
||||||
m_sProjsDir = sProjsDir
|
|
||||||
m_sProdsDir = sProdsDir
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,330 +0,0 @@
|
|||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Module CoreMap
|
|
||||||
|
|
||||||
'Private m_refMainWindowVM As MainWindowVM
|
|
||||||
'Private m_refMyStatusBarVM As MyStatusBarVM
|
|
||||||
'Private m_refProjManagerVM As ProjManagerVM
|
|
||||||
'Private m_refProdManagerVM As ProdManagerVM
|
|
||||||
'Private m_refProjectVM As ProjectVM
|
|
||||||
'Private m_refMainMenuVM As MainMenuVM
|
|
||||||
Private m_refMachinePanelVM As MachinePanelVM
|
|
||||||
Private m_refMyMachGroupPanelVM As MyMachGroupPanelVM
|
|
||||||
'Private m_refLeftPanelVM As LeftPanelVM
|
|
||||||
'Private m_refBottomPanelVM As BottomPanelVM
|
|
||||||
'Private m_refShowBeamPanelVM As ShowBeamPanelVM
|
|
||||||
'Private m_refConfigurationPageVM As ConfigurationPageVM
|
|
||||||
'Private m_refRawPartListVM As RawPartListVM
|
|
||||||
'Private m_refPartInRawPartListVM As PartInRawPartListVM
|
|
||||||
'Private m_refWarehouseWndVM As WarehouseWndVM
|
|
||||||
'Private m_refFeatureListVM As FeatureListVM
|
|
||||||
'Private m_refFreeContourManagerVM As FreeContourManagerVM
|
|
||||||
'Private m_refFreeContourInputVM As FreeContourInputVM
|
|
||||||
'Private m_refPartManagerVM As PartManagerVM
|
|
||||||
'Private m_refInstrumentPanelVM As InstrumentPanelVM
|
|
||||||
'Private m_refTopPanelVM As TopPanelVM
|
|
||||||
'Private m_refOptimizePanelVM As OptimizePanelVM
|
|
||||||
'Private m_refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
|
||||||
|
|
||||||
#Region "Get"
|
|
||||||
|
|
||||||
'Public ReadOnly Property refMainWindowVM As MainWindowVM
|
|
||||||
' Get
|
|
||||||
' Return m_refMainWindowVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refMyStatusBarVM As MyStatusBarVM
|
|
||||||
' Get
|
|
||||||
' Return LibMap.refStatusBarVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refProjManagerVM As ProjManagerVM
|
|
||||||
' Get
|
|
||||||
' Return m_refProjManagerVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
'Public ReadOnly Property refProdManagerVM As ProdManagerVM
|
|
||||||
' Get
|
|
||||||
' Return m_refProdManagerVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refProjectVM As ProjectVM
|
|
||||||
' Get
|
|
||||||
' Return m_refProjectVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property refSceneHostVM As SceneHostVM
|
|
||||||
Get
|
|
||||||
Return LibMap.refSceneHostVM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refShowPanelVM As ShowPanelVM
|
|
||||||
' Get
|
|
||||||
' Return LibMap.refShowPanelVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refMainMenuVM As MainMenuVM
|
|
||||||
' Get
|
|
||||||
' Return m_refMainMenuVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property refMachinePanelVM As MachinePanelVM
|
|
||||||
Get
|
|
||||||
Return m_refMachinePanelVM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refLeftPanelVM As LeftPanelVM
|
|
||||||
' Get
|
|
||||||
' Return m_refLeftPanelVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property refMachGroupPanelVM As MyMachGroupPanelVM
|
|
||||||
Get
|
|
||||||
Return m_refMyMachGroupPanelVM
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refBottomPanelVM As BottomPanelVM
|
|
||||||
' Get
|
|
||||||
' Return m_refBottomPanelVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refShowBeamPanelVM As ShowBeamPanelVM
|
|
||||||
' Get
|
|
||||||
' Return m_refShowBeamPanelVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refConfigurationPageVM As ConfigurationPageVM
|
|
||||||
' Get
|
|
||||||
' Return m_refConfigurationPageVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refRawPartListVM As RawPartListVM
|
|
||||||
' Get
|
|
||||||
' Return m_refRawPartListVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refPartInRawPartListVM As PartInRawPartListVM
|
|
||||||
' Get
|
|
||||||
' Return m_refPartInRawPartListVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refWarehouseWndVM As WarehouseWndVM
|
|
||||||
' Get
|
|
||||||
' Return m_refWarehouseWndVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refFeatureListVM As FeatureListVM
|
|
||||||
' Get
|
|
||||||
' Return m_refFeatureListVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refFreeContourManagerVM As FreeContourManagerVM
|
|
||||||
' Get
|
|
||||||
' Return m_refFreeContourManagerVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refFreeContourInputVM As FreeContourInputVM
|
|
||||||
' Get
|
|
||||||
' Return m_refFreeContourInputVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refPartManagerVM As PartManagerVM
|
|
||||||
' Get
|
|
||||||
' Return m_refPartManagerVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refInstrumentPanelVM As MyInstrumentPanelVM
|
|
||||||
' Get
|
|
||||||
' Return m_refInstrumentPanelVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refTopPanelVM As TopPanelVM
|
|
||||||
' Get
|
|
||||||
' Return m_refTopPanelVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refOptimizePanelVM As OptimizePanelVM
|
|
||||||
' Get
|
|
||||||
' Return m_refOptimizePanelVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
'Public ReadOnly Property refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
|
||||||
' Get
|
|
||||||
' Return m_refOpenProjectFileDialogVM
|
|
||||||
' End Get
|
|
||||||
'End Property
|
|
||||||
|
|
||||||
#End Region ' Get
|
|
||||||
|
|
||||||
#Region "Set"
|
|
||||||
|
|
||||||
'Friend Function SetRefMyStatusBarVM(MyStatusBarVM As MyStatusBarVM) As Boolean
|
|
||||||
' LibMap.SetRefStatusBarVM(MyStatusBarVM)
|
|
||||||
' Return Not IsNothing(LibMap.refStatusBarVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefProjManagerVM(ProjManagerVM As ProjManagerVM) As Boolean
|
|
||||||
' m_refProjManagerVM = ProjManagerVM
|
|
||||||
' Return Not IsNothing(m_refProjManagerVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefProdManagerVM(ProdManagerVM As ProdManagerVM) As Boolean
|
|
||||||
' m_refProdManagerVM = ProdManagerVM
|
|
||||||
' Return Not IsNothing(m_refProdManagerVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
|
|
||||||
' m_refProjectVM = ProjectVM
|
|
||||||
' Return Not IsNothing(m_refProjectVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefMainMenuVM(MainMenuVM As MainMenuVM) As Boolean
|
|
||||||
' m_refMainMenuVM = MainMenuVM
|
|
||||||
' Return Not IsNothing(m_refMainMenuVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
Public Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
|
|
||||||
LibMap.SetRefSceneHostVM(SceneHostVM)
|
|
||||||
Return Not IsNothing(LibMap.refSceneHostVM)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefShowPanelVM(ShowPanelVM As ShowPanelVM) As Boolean
|
|
||||||
' LibMap.SetRefShowPanelVM(ShowPanelVM)
|
|
||||||
' Return Not IsNothing(LibMap.refShowPanelVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
Public Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
|
|
||||||
m_refMachinePanelVM = MachinePanelVM
|
|
||||||
Return Not IsNothing(m_refMachinePanelVM)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefLeftPanelVM(LeftPanelVM As LeftPanelVM) As Boolean
|
|
||||||
' m_refLeftPanelVM = LeftPanelVM
|
|
||||||
' Return Not IsNothing(m_refLeftPanelVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
Public Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
|
|
||||||
m_refMyMachGroupPanelVM = MachGroupPanelVM
|
|
||||||
Return Not IsNothing(m_refMyMachGroupPanelVM)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefBottomPanelVM(BottomPanelVM As BottomPanelVM) As Boolean
|
|
||||||
' m_refBottomPanelVM = BottomPanelVM
|
|
||||||
' Return Not IsNothing(m_refBottomPanelVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefShowBeamPanelVM(ShowBeamPanelVM As ShowBeamPanelVM) As Boolean
|
|
||||||
' m_refShowBeamPanelVM = ShowBeamPanelVM
|
|
||||||
' Return Not IsNothing(m_refShowBeamPanelVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefConfigurationPageVM(ConfigurationPageVM As ConfigurationPageVM) As Boolean
|
|
||||||
' m_refConfigurationPageVM = ConfigurationPageVM
|
|
||||||
' Return Not IsNothing(m_refConfigurationPageVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefRawPartListVM(RawPartListVM As RawPartListVM) As Boolean
|
|
||||||
' m_refRawPartListVM = RawPartListVM
|
|
||||||
' Return Not IsNothing(m_refRawPartListVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefPartInRawPartListVM(PartInRawPartListVM As PartInRawPartListVM) As Boolean
|
|
||||||
' m_refPartInRawPartListVM = PartInRawPartListVM
|
|
||||||
' Return Not IsNothing(m_refPartInRawPartListVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefWarehouseWndVM(WarehouseWndVM As WarehouseWndVM) As Boolean
|
|
||||||
' m_refWarehouseWndVM = WarehouseWndVM
|
|
||||||
' Return Not IsNothing(m_refWarehouseWndVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefFeatureListVM(FeatureListVM As FeatureListVM) As Boolean
|
|
||||||
' m_refFeatureListVM = FeatureListVM
|
|
||||||
' Return Not IsNothing(m_refFeatureListVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefFreeContourManagerVM(FreeContourManagerVM As FreeContourManagerVM) As Boolean
|
|
||||||
' m_refFreeContourManagerVM = FreeContourManagerVM
|
|
||||||
' Return Not IsNothing(m_refFreeContourManagerVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefFreeContourInputVM(FreeContourInputVM As FreeContourInputVM) As Boolean
|
|
||||||
' m_refFreeContourInputVM = FreeContourInputVM
|
|
||||||
' Return Not IsNothing(m_refFreeContourInputVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefPartManagerVM(PartManagerVM As PartManagerVM) As Boolean
|
|
||||||
' m_refPartManagerVM = PartManagerVM
|
|
||||||
' Return Not IsNothing(m_refPartManagerVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefInstrumentPanelVM(InstrumentPanelVM As InstrumentPanelVM) As Boolean
|
|
||||||
' m_refInstrumentPanelVM = InstrumentPanelVM
|
|
||||||
' Return Not IsNothing(m_refInstrumentPanelVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefTopPanelVM(TopPanelVM As TopPanelVM) As Boolean
|
|
||||||
' m_refTopPanelVM = TopPanelVM
|
|
||||||
' Return Not IsNothing(m_refTopPanelVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefOptimizePanelVM(OptimizePanelVM As OptimizePanelVM) As Boolean
|
|
||||||
' m_refOptimizePanelVM = OptimizePanelVM
|
|
||||||
' Return Not IsNothing(m_refOptimizePanelVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Friend Function SetRefOpenProjectFileDialogVM(OpenProjectFileDialogVM As OpenProjectFileDialogVM) As Boolean
|
|
||||||
' m_refOpenProjectFileDialogVM = OpenProjectFileDialogVM
|
|
||||||
' Return Not IsNothing(m_refOpenProjectFileDialogVM)
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
#End Region ' Set
|
|
||||||
|
|
||||||
#Region "Init"
|
|
||||||
|
|
||||||
'Friend Function BeginInit(MainWindowVM As MainWindowVM) As Boolean
|
|
||||||
' m_refMainWindowVM = MainWindowVM
|
|
||||||
' Return Not IsNothing(m_refMainWindowVM)
|
|
||||||
'End Function
|
|
||||||
Friend Function EndInit() As Boolean
|
|
||||||
'Return Not IsNothing(m_refMainWindowVM) AndAlso Not IsNothing(m_refMainMenuVM) AndAlso
|
|
||||||
' Not IsNothing(LibMap.refStatusBarVM) AndAlso Not IsNothing(m_refProjManagerVM) AndAlso
|
|
||||||
' Not IsNothing(m_refProdManagerVM) AndAlso Not IsNothing(m_refConfigurationPageVM) AndAlso
|
|
||||||
' Not IsNothing(LibMap.refSceneHostVM) AndAlso Not IsNothing(LibMap.refShowPanelVM) AndAlso
|
|
||||||
' Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM) AndAlso
|
|
||||||
' Not IsNothing(m_refRawPartListVM) AndAlso Not IsNothing(m_refWarehouseWndVM) AndAlso
|
|
||||||
' Not IsNothing(m_refFeatureListVM) AndAlso Not IsNothing(m_refPartInRawPartListVM) AndAlso
|
|
||||||
' Not IsNothing(m_refFreeContourManagerVM) AndAlso Not IsNothing(m_refFreeContourInputVM) AndAlso
|
|
||||||
' Not IsNothing(m_refInstrumentPanelVM) AndAlso Not IsNothing(m_refTopPanelVM) AndAlso
|
|
||||||
' Not IsNothing(m_refPartManagerVM) AndAlso Not IsNothing(m_refOptimizePanelVM) AndAlso
|
|
||||||
' Not IsNothing(m_refShowBeamPanelVM) AndAlso Not IsNothing(m_refOpenProjectFileDialogVM) AndAlso
|
|
||||||
' LibMap.EndInit()
|
|
||||||
Return Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region ' Init
|
|
||||||
|
|
||||||
End Module
|
|
||||||
@@ -200,7 +200,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
|||||||
{
|
{
|
||||||
var currProd = FindByProdId(ProdId);
|
var currProd = FindByProdId(ProdId);
|
||||||
|
|
||||||
return Core.ProdFileM.CreateProdFileM(currProd.ProdId, ProjIdByProd(ProdId), currProd.DtCreated, currProd.Description);
|
return Core.ProdFileM.CreateProdFileM(currProd.ProdId, ProjIdByProd(ProdId), currProd.DtCreated, currProd.Description, Core.ConstBeam.BWType.NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -213,7 +213,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
|||||||
List<Core.ProdFileM> result = new List<Core.ProdFileM>();
|
List<Core.ProdFileM> result = new List<Core.ProdFileM>();
|
||||||
var dbResult = GetLastDbModelDesc(numRecord);
|
var dbResult = GetLastDbModelDesc(numRecord);
|
||||||
// conversione
|
// conversione
|
||||||
result = dbResult.Select(x => Core.ProdFileM.CreateProdFileM(x.ProdId, ProjIdByProd(x.ProdId), x.DtCreated, x.Description)).ToList();
|
result = dbResult.Select(x => Core.ProdFileM.CreateProdFileM(x.ProdId, ProjIdByProd(x.ProdId), x.DtCreated, x.Description, Core.ConstBeam.BWType.NULL)).ToList();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using EgtBEAMWALL.DataLayer.DatabaseModels;
|
using EgtBEAMWALL.DataLayer.DatabaseModels;
|
||||||
|
using static EgtBEAMWALL.Core.ConstBeam;
|
||||||
|
|
||||||
namespace EgtBEAMWALL.DataLayer.Controllers
|
namespace EgtBEAMWALL.DataLayer.Controllers
|
||||||
{
|
{
|
||||||
@@ -33,7 +34,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected Core.ProjFileM coreConv(ProjModel currProj)
|
protected Core.ProjFileM coreConv(ProjModel currProj)
|
||||||
{
|
{
|
||||||
Core.ProjFileM answ = Core.ProjFileM.CreateProjFileM(currProj.ProjId, ProdIdByProdDbId(currProj.ProdDbId), currProj.DtCreated, currProj.DtExported, currProj.ListName, currProj.BTLFileName, currProj.IsNew, currProj.Locked);
|
Core.ProjFileM answ = Core.ProjFileM.CreateProjFileM(currProj.ProjId, ProdIdByProdDbId(currProj.ProdDbId), currProj.DtCreated, currProj.DtExported, currProj.ListName, currProj.BTLFileName, currProj.IsNew, currProj.Locked, currProj.PType);
|
||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,7 +337,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
|||||||
//currProjs.ForEach(x => x.Locked = Locked);
|
//currProjs.ForEach(x => x.Locked = Locked);
|
||||||
foreach (var item in currProjs)
|
foreach (var item in currProjs)
|
||||||
{
|
{
|
||||||
//item.ProdDbId = currProd.ProdDbId;
|
//item.ProdDbId = currProd.ProdDbId;
|
||||||
item.Locked = Locked;
|
item.Locked = Locked;
|
||||||
dbCtx.Entry(item).State = System.Data.Entity.EntityState.Modified;
|
dbCtx.Entry(item).State = System.Data.Entity.EntityState.Modified;
|
||||||
}
|
}
|
||||||
@@ -498,13 +499,14 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
|||||||
/// <param name="ListName"></param>
|
/// <param name="ListName"></param>
|
||||||
/// <param name="DtExported"></param>
|
/// <param name="DtExported"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Core.ProjFileM UpdateInfo(int ProjId, string BTLFileName, string ListName, DateTime DtExported)
|
public Core.ProjFileM UpdateInfo(int ProjId, string BTLFileName, string ListName, DateTime DtExported, BWType PType)
|
||||||
{
|
{
|
||||||
var currData = FindByProjId(ProjId);
|
var currData = FindByProjId(ProjId);
|
||||||
// aggiorno valore BTL
|
// aggiorno valore BTL
|
||||||
currData.BTLFileName = BTLFileName;
|
currData.BTLFileName = BTLFileName;
|
||||||
currData.DtExported = DtExported;
|
currData.DtExported = DtExported;
|
||||||
currData.ListName = ListName;
|
currData.ListName = ListName;
|
||||||
|
currData.PType = PType;
|
||||||
|
|
||||||
// Commit changes
|
// Commit changes
|
||||||
dbCtx.SaveChanges();
|
dbCtx.SaveChanges();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using static EgtBEAMWALL.Core.ConstBeam;
|
||||||
|
|
||||||
namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
||||||
{
|
{
|
||||||
@@ -60,6 +61,11 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
|||||||
[Column("Id")]
|
[Column("Id")]
|
||||||
public int ProjId { get; set; }
|
public int ProjId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tipologia del progetto (Travi, Pareti, ...)
|
||||||
|
/// </summary>
|
||||||
|
public BWType PType { get; set; } = BWType.NULL;
|
||||||
|
|
||||||
#endregion Public Properties
|
#endregion Public Properties
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,6 +114,10 @@
|
|||||||
<Compile Include="Migrations\202105051121209_renameIndex.designer.cs">
|
<Compile Include="Migrations\202105051121209_renameIndex.designer.cs">
|
||||||
<DependentUpon>202105051121209_renameIndex.cs</DependentUpon>
|
<DependentUpon>202105051121209_renameIndex.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Migrations\202107141618197_AddBwProjType.cs" />
|
||||||
|
<Compile Include="Migrations\202107141618197_AddBwProjType.designer.cs">
|
||||||
|
<DependentUpon>202107141618197_AddBwProjType.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Migrations\Configuration.cs" />
|
<Compile Include="Migrations\Configuration.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Utils.cs" />
|
<Compile Include="Utils.cs" />
|
||||||
@@ -141,10 +145,13 @@
|
|||||||
<EmbeddedResource Include="Migrations\202105051121209_renameIndex.resx">
|
<EmbeddedResource Include="Migrations\202105051121209_renameIndex.resx">
|
||||||
<DependentUpon>202105051121209_renameIndex.cs</DependentUpon>
|
<DependentUpon>202105051121209_renameIndex.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\202107141618197_AddBwProjType.resx">
|
||||||
|
<DependentUpon>202107141618197_AddBwProjType.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.DataLayer.dll</PostBuildEvent>
|
<!-- <PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.DataLayer.dll</PostBuildEvent> -->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace EgtBEAMWALL.DataLayer.Migrations
|
||||||
|
{
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
[GeneratedCode("EntityFramework.Migrations", "6.4.4")]
|
||||||
|
public sealed partial class AddBwProjType : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(AddBwProjType));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "202107141618197_AddBwProjType"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
namespace EgtBEAMWALL.DataLayer.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
public partial class AddBwProjType : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
AddColumn("dbo.ProjList", "PType", c => c.Int(nullable: false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
DropColumn("dbo.ProjList", "PType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -6,9 +6,121 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class BTLFeatureVM
|
Public Class BTLFeatureVM
|
||||||
Inherits Core.BTLFeatureVM
|
Inherits VMBase
|
||||||
|
|
||||||
Public Overrides Property bDO As Boolean
|
Private WithEvents m_BTLFeatureM As BTLFeatureM
|
||||||
|
Public ReadOnly Property BTLFeatureM As BTLFeatureM
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private m_BTLPartM As BTLPartM
|
||||||
|
|
||||||
|
Public ReadOnly Property nFeatureId As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nFeatureId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property GRPList As ObservableCollection(Of Integer)
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.GRPList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of Integer))
|
||||||
|
m_BTLFeatureM.GRPList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nSelGRP As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nSelGRP
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
If value <> -1 Then
|
||||||
|
' aggiorno la feature con nuovo valore
|
||||||
|
Dim vPar() As Double = Nothing
|
||||||
|
Dim sPar As String = String.Empty
|
||||||
|
Dim vParQ() As String = Nothing
|
||||||
|
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
|
||||||
|
Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(value, m_BTLFeatureM.nPRC, nSelSIDE, m_BTLFeatureM.sDES, m_BTLFeatureM.nPRID, m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
|
||||||
|
If bOK Then
|
||||||
|
m_BTLFeatureM.nSelGRP = value
|
||||||
|
' seleziono feature in disegno
|
||||||
|
SelGeomFeature()
|
||||||
|
' rendo non calcolata questa feature
|
||||||
|
CalcFeatureUpdate(False, 0, 0, 0, "")
|
||||||
|
Else
|
||||||
|
NotifyPropertyChanged("nSelGRP")
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(nSelGRP))
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Friend ReadOnly Property sDescGRP As String
|
||||||
|
Get
|
||||||
|
Dim sDescConstruction As String = String.Empty
|
||||||
|
If CalcBeamPrivateProfileGRP(m_BTLFeatureM.nSelGRP) = 0 Then
|
||||||
|
sDescConstruction = "L"
|
||||||
|
Else
|
||||||
|
sDescConstruction = "T"
|
||||||
|
End If
|
||||||
|
sDescConstruction &= m_BTLFeatureM.nPRC.ToString("000")
|
||||||
|
Return sDescConstruction
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nPRC As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nPRC
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_BTLFeatureM.nPRC = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SIDEList As ObservableCollection(Of Integer)
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.SIDEList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of Integer))
|
||||||
|
m_BTLFeatureM.SIDEList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Lato
|
||||||
|
Public Property nSelSIDE As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nSelSIDE
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
If value <> -1 Then
|
||||||
|
' aggiorno la feature con nuovo valore
|
||||||
|
Dim vPar() As Double = Nothing
|
||||||
|
Dim sPar As String = String.Empty
|
||||||
|
Dim vParQ() As String = Nothing
|
||||||
|
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
|
||||||
|
Dim bOK As Boolean = m_BTLFeatureM.UpdateParams(nSelGRP, m_BTLFeatureM.nPRC, value, m_BTLFeatureM.sDES, m_BTLFeatureM.nPRID, m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
|
||||||
|
If bOK Then
|
||||||
|
m_BTLFeatureM.nSelSIDE = value
|
||||||
|
SelGeomFeature()
|
||||||
|
' rendo non calcolata questa feature
|
||||||
|
CalcFeatureUpdate(False, 0, 0, 0, "")
|
||||||
|
Else
|
||||||
|
NotifyPropertyChanged("nSelGRP")
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property bDO As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_BTLFeatureM.bDO
|
Return m_BTLFeatureM.bDO
|
||||||
End Get
|
End Get
|
||||||
@@ -22,8 +134,214 @@ Public Class BTLFeatureVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property nPRID As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nPRID
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_BTLFeatureM.nPRID = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sDES As String
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.sDES
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_BTLFeatureM.sDES = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property frFRAME As Frame3d
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.frFRAME
|
||||||
|
End Get
|
||||||
|
Set(value As Frame3d)
|
||||||
|
m_BTLFeatureM.frFRAME = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' proprieta' che mostra la descrizione in interfaccia
|
||||||
|
Public ReadOnly Property sDesc As String
|
||||||
|
Get
|
||||||
|
Return sDescGRP & " " & sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sDrawPath As String
|
||||||
|
Get
|
||||||
|
Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nState As CalcStates
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nCALC_ERR As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nCALC_ERR
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nCALC_ROT As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nCALC_ROT
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nCALC_MSG As String
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.sCALC_MSG
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||||
|
Get
|
||||||
|
If Not m_BTLFeatureM.bDO Then
|
||||||
|
Return Brushes.Aqua
|
||||||
|
ElseIf m_BTLFeatureM.nState = 0 Then
|
||||||
|
Return Brushes.Green
|
||||||
|
ElseIf m_BTLFeatureM.nState < 0 Then
|
||||||
|
Return Brushes.LightGray
|
||||||
|
ElseIf m_BTLFeatureM.nState > 0 Then
|
||||||
|
Return Brushes.Red
|
||||||
|
Else
|
||||||
|
Return Brushes.Red
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(m_BTLFeatureM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ERR_Letter As String
|
||||||
|
Get
|
||||||
|
Select Case m_BTLFeatureM.nCALC_ERR
|
||||||
|
Case 22
|
||||||
|
Return "c"
|
||||||
|
Case 19, 23, 24, 25
|
||||||
|
Return "e"
|
||||||
|
Case 17
|
||||||
|
Return "w"
|
||||||
|
Case < 0
|
||||||
|
Return "i"
|
||||||
|
Case Else
|
||||||
|
Return ""
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Select Case m_BTLFeatureM.nCALC_ERR
|
||||||
|
Case 19, 22, 23, 24, 25
|
||||||
|
Return Brushes.Red
|
||||||
|
Case 17
|
||||||
|
Return Brushes.Orange
|
||||||
|
Case < 0
|
||||||
|
Return Brushes.Green
|
||||||
|
Case Else
|
||||||
|
Return Brushes.Red
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'Private m_PBTLParamVMList As ObservableCollection(Of BTLParamVM)
|
||||||
|
'Public Property PBTLParamVMList As ObservableCollection(Of BTLParamVM)
|
||||||
|
' Get
|
||||||
|
' Return m_PBTLParamVMList
|
||||||
|
' End Get
|
||||||
|
' Set(value As ObservableCollection(Of BTLParamVM))
|
||||||
|
' m_PBTLParamVMList = value
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Protected m_SelPBTLParam As BTLParamVM
|
||||||
|
'Public Property SelPBTLParam As BTLParamVM
|
||||||
|
' Get
|
||||||
|
' Return m_SelPBTLParam
|
||||||
|
' End Get
|
||||||
|
' Set(value As BTLParamVM)
|
||||||
|
' m_SelPBTLParam = value
|
||||||
|
' If Not IsNothing(m_SelPBTLParam) Then
|
||||||
|
' ' imposto path disegno da mostrare in BottomPanel
|
||||||
|
' Map.refBottomPanelVM.SetCurrDraw(sDrawPath)
|
||||||
|
' End If
|
||||||
|
' NotifyPropertyChanged(NameOf(SelPBTLParam))
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Private m_QBTLParamVMList As ObservableCollection(Of BTLParamVM)
|
||||||
|
'Public Property QBTLParamVMList As ObservableCollection(Of BTLParamVM)
|
||||||
|
' Get
|
||||||
|
' Return m_QBTLParamVMList
|
||||||
|
' End Get
|
||||||
|
' Set(value As ObservableCollection(Of BTLParamVM))
|
||||||
|
' m_QBTLParamVMList = value
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
'Protected m_SelQParam As BTLParamVM
|
||||||
|
'Public Property SelQBTLParam As BTLParamVM
|
||||||
|
' Get
|
||||||
|
' Return m_SelQParam
|
||||||
|
' End Get
|
||||||
|
' Set(value As BTLParamVM)
|
||||||
|
' m_SelQParam = value
|
||||||
|
' If Not IsNothing(m_SelQParam) Then
|
||||||
|
' ' imposto path disegno da mostrare in BottomPanel
|
||||||
|
' Map.refBottomPanelVM.SetCurrDraw(sDrawPath)
|
||||||
|
' End If
|
||||||
|
' NotifyPropertyChanged(NameOf(SelQBTLParam))
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdDeleteFeature As ICommand
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
'Sub New(ParentPart As BTLPartVM, nFeatureId As Integer)
|
||||||
|
' MyBase.New(ParentPart, nFeatureId)
|
||||||
|
' ' leggo gruppo, numero feature e lato
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_GRP, m_nSelGRP)
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_PRC, m_nPRC)
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_SIDE, m_nSelSIDE)
|
||||||
|
' Dim nDO As Integer = 1
|
||||||
|
' If EgtGetInfo(nFeatureId, BTL_FTR_DO, nDO) Then
|
||||||
|
' m_bDO = (nDO <> 0)
|
||||||
|
' Else
|
||||||
|
' m_bDO = True
|
||||||
|
' End If
|
||||||
|
' ' leggo des,prid e frame
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_DES, m_sDES)
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_PRID, m_nPRID)
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_FRAME, m_frFRAME)
|
||||||
|
' ' leggo calc error
|
||||||
|
' Dim nErr As Integer = 0
|
||||||
|
' Dim nRot As Integer = 0
|
||||||
|
' Dim nFall As Integer = 0
|
||||||
|
' Dim sMsg As String = ""
|
||||||
|
' Dim bCalc As Boolean = False
|
||||||
|
' bCalc = EgtGetInfo(m_nFeatureId, ITG_PROJ_ERR, nErr)
|
||||||
|
' EgtGetInfo(m_nFeatureId, ITG_PROJ_ROT, nRot)
|
||||||
|
' EgtGetInfo(m_nFeatureId, ITG_PROJ_FALL, nFall)
|
||||||
|
' EgtGetInfo(m_nFeatureId, ITG_PROJ_MSG, sMsg)
|
||||||
|
' CalcFeatureUpdate(bCalc, nErr, nRot, nFall, sMsg)
|
||||||
|
' ' leggo parametri della feature
|
||||||
|
' GetBeamPrivateProfileGRPList(CalcBeamPrivateProfileGRP(nSelGRP), m_nPRC, m_GRPList)
|
||||||
|
' GetBeamPrivateProfileName(m_nSelGRP, m_nPRC, Me)
|
||||||
|
' ' crea parametri per questa feature da file ini
|
||||||
|
' CreateFeatureParams()
|
||||||
|
' ReadFeatureParams()
|
||||||
|
'End Sub
|
||||||
|
|
||||||
Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
|
Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
|
||||||
m_BTLFeatureM = BTLFeatureM
|
m_BTLFeatureM = BTLFeatureM
|
||||||
'AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
|
'AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
|
||||||
@@ -48,10 +366,160 @@ Public Class BTLFeatureVM
|
|||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
|
'Private Sub CreatePBTLParamVMList()
|
||||||
|
' Dim all As List(Of BTLParamVM) = (From BTLParamM In m_BTLFeatureM.GetPBTLParams()
|
||||||
|
' Select New BTLParamVM(BTLParamM, m_BTLFeatureM)).ToList()
|
||||||
|
|
||||||
|
' For Each BTLParamVM As BTLParamVM In all
|
||||||
|
' AddHandler BTLParamVM.PropertyChanged, AddressOf OnPBTLParamVMPropertyChanged
|
||||||
|
' Next
|
||||||
|
|
||||||
|
' m_PBTLParamVMList = New ObservableCollection(Of BTLParamVM)(all)
|
||||||
|
' AddHandler m_PBTLParamVMList.CollectionChanged, AddressOf OnPBTLParamVMListChanged
|
||||||
|
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Private Sub CreateQBTLParamVMList()
|
||||||
|
' Dim all As List(Of BTLParamVM) = (From BTLParamM In m_BTLFeatureM.GetQBTLParams()
|
||||||
|
' Select New BTLParamVM(BTLParamM, m_BTLFeatureM)).ToList()
|
||||||
|
' For Each BTLParamVM As BTLParamVM In all
|
||||||
|
' AddHandler BTLParamVM.PropertyChanged, AddressOf OnQBTLParamVMPropertyChanged
|
||||||
|
' Next
|
||||||
|
|
||||||
|
' m_QBTLParamVMList = New ObservableCollection(Of BTLParamVM)(all)
|
||||||
|
' AddHandler m_QBTLParamVMList.CollectionChanged, AddressOf OnQBTLParamVMListChanged
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
|
||||||
|
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||||
|
Friend Sub CalcFeatureUpdate(bCalc As Boolean, ERR As Integer, ROT As Integer, FALL As Integer, MSG As String)
|
||||||
|
If Not bCalc Then
|
||||||
|
m_BTLFeatureM.nState = CalcStates.NOTCALCULATED
|
||||||
|
m_BTLFeatureM.nCALC_ERR = 0
|
||||||
|
m_BTLFeatureM.nCALC_ROT = 0
|
||||||
|
m_BTLFeatureM.sCALC_MSG = ""
|
||||||
|
Else
|
||||||
|
m_BTLFeatureM.nCALC_ERR = ERR
|
||||||
|
m_BTLFeatureM.nCALC_ROT = ROT
|
||||||
|
m_BTLFeatureM.sCALC_MSG = MSG
|
||||||
|
If ERR = 0 Then
|
||||||
|
m_BTLFeatureM.nState = 0
|
||||||
|
ElseIf ERR > 1 Then
|
||||||
|
m_BTLFeatureM.nState = 1
|
||||||
|
ElseIf ERR < 1 Then
|
||||||
|
m_BTLFeatureM.nState = -1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che seleziona la feature nella geometria
|
||||||
|
Friend Shared Sub SelGeomFeature(Feature As BTLFeatureVM)
|
||||||
|
EgtDeselectAll()
|
||||||
|
If Not IsNothing(Feature) Then EgtSelectObj(Feature.nFeatureId)
|
||||||
|
End Sub
|
||||||
|
Friend Sub SelGeomFeature()
|
||||||
|
EgtDeselectAll()
|
||||||
|
EgtSelectObj(nFeatureId)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function Copy() As BTLFeatureM
|
||||||
|
' creo nuova feature
|
||||||
|
Dim vPar() As Double = Nothing
|
||||||
|
Dim sPar As String = String.Empty
|
||||||
|
Dim vParQ() As String = Nothing
|
||||||
|
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
|
||||||
|
' aggiorno la feature con nuovo valore
|
||||||
|
EgtBeamSetPart(m_BTLPartM.nPartId)
|
||||||
|
Dim nNewFeatureId As Integer = EgtBeamAddProcess(m_BTLFeatureM.nSelGRP, m_BTLFeatureM.nPRC, m_BTLFeatureM.nSelSIDE, m_BTLFeatureM.sDES,
|
||||||
|
m_BTLFeatureM.ParentPart.NewProcId(), m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
|
||||||
|
' se è stata creata
|
||||||
|
If nNewFeatureId <> GDB_ID.NULL Then
|
||||||
|
Dim NewFeat As BTLFeatureM = BTLFeatureM.CreateBTLFeature(m_BTLPartM, nNewFeatureId)
|
||||||
|
' la aggiungo a struttura BTL corrente
|
||||||
|
m_BTLPartM.AddBTLFeature(NewFeat)
|
||||||
|
Return NewFeat
|
||||||
|
End If
|
||||||
|
Return Nothing
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function Copy(DestBTLPart As BTLPartM) As Boolean
|
||||||
|
' creo nuova feature
|
||||||
|
Dim vPar() As Double = Nothing
|
||||||
|
Dim sPar As String = String.Empty
|
||||||
|
Dim vParQ() As String = Nothing
|
||||||
|
m_BTLFeatureM.CalcParamArray(vPar, sPar, vParQ)
|
||||||
|
' aggiorno la feature con nuovo valore
|
||||||
|
EgtBeamSetPart(DestBTLPart.nPartId)
|
||||||
|
Dim nNewFeatureId As Integer = EgtBeamAddProcess(m_BTLFeatureM.nSelGRP, m_BTLFeatureM.nPRC, m_BTLFeatureM.nSelSIDE, m_BTLFeatureM.sDES,
|
||||||
|
DestBTLPart.NewProcId(), m_BTLFeatureM.frFRAME, vPar, sPar, vParQ)
|
||||||
|
' se è stata creata
|
||||||
|
If nNewFeatureId <> GDB_ID.NULL Then
|
||||||
|
Dim NewFeat As BTLFeatureM = BTLFeatureM.CreateBTLFeature(m_BTLPartM, nNewFeatureId)
|
||||||
|
' la aggiungo a struttura BTL pezzo di destinazione
|
||||||
|
DestBTLPart.AddBTLFeature(NewFeat)
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
'Private Sub OnPBTLParamAdded(sender As Object, e As BTLParamAddedEventArgs) Handles m_BTLFeatureM.PBTLParamAdded
|
||||||
|
' Dim BTLParamVM As BTLParamVM = New BTLParamVM(e.NewBTLParam, m_BTLFeatureM)
|
||||||
|
' PBTLParamVMList.Add(BTLParamVM)
|
||||||
|
'End Sub
|
||||||
|
'Private Sub OnQBTLParamAdded(sender As Object, e As BTLParamAddedEventArgs) Handles m_BTLFeatureM.QBTLParamAdded
|
||||||
|
' Dim BTLParamVM As BTLParamVM = New BTLParamVM(e.NewBTLParam, m_BTLFeatureM)
|
||||||
|
' QBTLParamVMList.Add(BTLParamVM)
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Private Sub OnPBTLParamVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||||
|
' If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||||
|
' For Each BTLParamVM As BTLParamVM In e.NewItems
|
||||||
|
' AddHandler BTLParamVM.PropertyChanged, AddressOf OnPBTLParamVMPropertyChanged
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
' If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||||
|
' For Each BTLParamVM As BTLParamVM In e.OldItems
|
||||||
|
' RemoveHandler BTLParamVM.PropertyChanged, AddressOf OnPBTLParamVMPropertyChanged
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
'Private Sub OnQBTLParamVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||||
|
' If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||||
|
' For Each BTLParamVM As BTLParamVM In e.NewItems
|
||||||
|
' AddHandler BTLParamVM.PropertyChanged, AddressOf OnQBTLParamVMPropertyChanged
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
' If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||||
|
' For Each BTLParamVM As BTLParamVM In e.OldItems
|
||||||
|
' RemoveHandler BTLParamVM.PropertyChanged, AddressOf OnQBTLParamVMPropertyChanged
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Private Sub OnPBTLParamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
|
' Select Case e.PropertyName
|
||||||
|
' Case "dValue", "sValue"
|
||||||
|
' ' riseleziono questa feature
|
||||||
|
' SelGeomFeature()
|
||||||
|
' ' rendo non calcolata questa feature
|
||||||
|
' CalcFeatureUpdate(False, 0, 0, 0, "")
|
||||||
|
' End Select
|
||||||
|
'End Sub
|
||||||
|
'Private Sub OnQBTLParamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
|
' Select Case e.PropertyName
|
||||||
|
' 'Case "sMATERIAL"
|
||||||
|
' End Select
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
#End Region ' EVENTS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -243,6 +243,7 @@
|
|||||||
<Compile Include="MachGroupPanel\BeamVM.vb" />
|
<Compile Include="MachGroupPanel\BeamVM.vb" />
|
||||||
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||||
<Compile Include="MachGroupPanel\MyMachGroupVM.vb" />
|
<Compile Include="MachGroupPanel\MyMachGroupVM.vb" />
|
||||||
|
<Compile Include="MachGroupPanel\PartVM.vb" />
|
||||||
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
||||||
<DependentUpon>MachinePanelV.xaml</DependentUpon>
|
<DependentUpon>MachinePanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -252,8 +253,12 @@
|
|||||||
<Compile Include="MachManagingThread\MachManagingThread.vb" />
|
<Compile Include="MachManagingThread\MachManagingThread.vb" />
|
||||||
<Compile Include="MachManagingThread\RWVariableManager.vb" />
|
<Compile Include="MachManagingThread\RWVariableManager.vb" />
|
||||||
<Compile Include="MainWindow\MainWindowM.vb" />
|
<Compile Include="MainWindow\MainWindowM.vb" />
|
||||||
|
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml.vb">
|
||||||
|
<DependentUpon>OpenProjectFileDialogV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogVM.vb" />
|
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogVM.vb" />
|
||||||
<Compile Include="ProjectManager\ProdFileVM.vb" />
|
<Compile Include="ProjectManager\ProdFileVM.vb" />
|
||||||
|
<Compile Include="ProjectManager\ProjectFileVM.vb" />
|
||||||
<Compile Include="Project\ProjectV.xaml.vb">
|
<Compile Include="Project\ProjectV.xaml.vb">
|
||||||
<DependentUpon>ProjectV.xaml</DependentUpon>
|
<DependentUpon>ProjectV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -281,8 +286,6 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Utility\Map.vb" />
|
<Compile Include="Utility\Map.vb" />
|
||||||
<Compile Include="Utility\VMBase.vb" />
|
<Compile Include="Utility\VMBase.vb" />
|
||||||
<Compile Include="ViewerOptimizerCommThread\ViewerOptimizerComm.vb" />
|
|
||||||
<Compile Include="ViewerOptimizerCommThread\ViewerOptimizerCommThread.vb" />
|
|
||||||
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
|
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
|
||||||
<DependentUpon>ViewPanelV.xaml</DependentUpon>
|
<DependentUpon>ViewPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -323,6 +326,10 @@
|
|||||||
<DependentUpon>MainWindowV.xaml</DependentUpon>
|
<DependentUpon>MainWindowV.xaml</DependentUpon>
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Page Include="OpenProjectFileDialog\OpenProjectFileDialogV.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Include="Project\ProjectV.xaml">
|
<Page Include="Project\ProjectV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||||
@@ -449,7 +456,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\AboutBoxImage.png" />
|
<Resource Include="Resources\AboutBoxImage.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ Public Class LeftPanelVM
|
|||||||
End If
|
End If
|
||||||
DbControllers.m_MachGroupController.UpdateStatus(Map.refSupervisorManagerVM.CurrProd.nProdId, Map.refProjectVM.SupervisorMachGroupPanelVM.SelectedMachGroup.Id, ItemState.Produced)
|
DbControllers.m_MachGroupController.UpdateStatus(Map.refSupervisorManagerVM.CurrProd.nProdId, Map.refProjectVM.SupervisorMachGroupPanelVM.SelectedMachGroup.Id, ItemState.Produced)
|
||||||
' aggiungere status!!
|
' aggiungere status!!
|
||||||
Part.NotifyPropertyChanged(NameOf(Part.Production_Background))
|
Part.NotifyPropertyChanged(NameOf(Part.Calc_Background))
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ Public Class MachCommandMessagePanelVM
|
|||||||
Public Sub Connect(ByVal param As Object)
|
Public Sub Connect(ByVal param As Object)
|
||||||
' creo thread gestione macchina
|
' creo thread gestione macchina
|
||||||
m_MachManagingThread = New Thread(Sub()
|
m_MachManagingThread = New Thread(Sub()
|
||||||
MachineCommThread.MachManagingThreadFunction(AddressOf ResultCallbackDlg, AddressOf CloseCallbackDlg,
|
CommunicationThread.MachManagingThreadFunction(AddressOf ResultCallbackDlg, AddressOf CloseCallbackDlg,
|
||||||
AddressOf UpdateCallbackDlg, AddressOf AlarmCallbackDlg,
|
AddressOf UpdateCallbackDlg, AddressOf AlarmCallbackDlg,
|
||||||
AddressOf AxisCoordinatesCallbackDlg, AddressOf OpStateCallbackDlg,
|
AddressOf AxisCoordinatesCallbackDlg, AddressOf OpStateCallbackDlg,
|
||||||
AddressOf ReadVarCallbackDlg)
|
AddressOf ReadVarCallbackDlg)
|
||||||
|
|||||||
@@ -7,21 +7,278 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class BeamMachGroupVM
|
Public Class BeamMachGroupVM
|
||||||
Inherits Core.BeamMachGroupVM
|
Inherits MyMachGroupVM
|
||||||
|
|
||||||
|
Public ReadOnly Property m_BeamMachGroupM As BeamMachGroupM
|
||||||
|
Get
|
||||||
|
Return m_MachGroupM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sStartCut As String
|
||||||
|
Get
|
||||||
|
Return LenToString(m_BeamMachGroupM.dStartCut, 3)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
Dim dValue As Double
|
||||||
|
If StringToLen(value, dValue) Then
|
||||||
|
Dim dOldValue As Double = m_BeamMachGroupM.dStartCut
|
||||||
|
m_BeamMachGroupM.dStartCut = dValue
|
||||||
|
If Not ReDrawBeamMachgroup() Then
|
||||||
|
' rispristino vecchio valore
|
||||||
|
m_BeamMachGroupM.dStartCut = dOldValue
|
||||||
|
ReDrawBeamMachgroup()
|
||||||
|
End If
|
||||||
|
m_BeamMachGroupM.dStartCut = dValue
|
||||||
|
EgtDraw()
|
||||||
|
If PartVMList.Count > 0 Then
|
||||||
|
Dim Beam As BeamVM = DirectCast(PartVMList(0), BeamVM)
|
||||||
|
Beam.UpdateOffset()
|
||||||
|
Beam.NotifyPropertyChanged("sOffset")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
NotifyPropertyChanged("sStartCut")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Property dStartCut As Double
|
||||||
|
Get
|
||||||
|
Return m_BeamMachGroupM.dStartCut
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_BeamMachGroupM.dStartCut = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SelBeam As BeamVM
|
||||||
|
Get
|
||||||
|
Return m_SelPart
|
||||||
|
End Get
|
||||||
|
Set(value As BeamVM)
|
||||||
|
m_SelPart = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
' definizione comandi
|
' definizione comandi
|
||||||
Private m_cmdDeleteMachGroup As ICommand
|
Private m_cmdDeleteMachGroup As ICommand
|
||||||
|
|
||||||
Sub New(BeamMachGroupM As BeamMachGroupM)
|
Sub New(BeamMachGroupM As BeamMachGroupM)
|
||||||
MyBase.New(BeamMachGroupM)
|
MyBase.New(BeamMachGroupM)
|
||||||
|
AddHandler m_BeamMachGroupM.PartAdded, AddressOf OnBeamAdded
|
||||||
|
AddHandler m_BeamMachGroupM.PartRemoved, AddressOf OnBeamRemoved
|
||||||
|
CreateBeamVMList()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Private Sub CreateBeamVMList()
|
||||||
|
Dim all As List(Of BeamVM) = (From BeamM In m_BeamMachGroupM.GetParts()
|
||||||
|
Select New BeamVM(BeamM)).ToList()
|
||||||
|
|
||||||
|
For Each BeamVM As BeamVM In all
|
||||||
|
AddHandler BeamVM.PropertyChanged, AddressOf OnBeamVMPropertyChanged
|
||||||
|
Next
|
||||||
|
|
||||||
|
m_PartVMList = New ObservableCollection(Of PartVM)(all)
|
||||||
|
AddHandler m_PartVMList.CollectionChanged, AddressOf OnBeamVMListChanged
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
Public Overrides Sub RefreshPartList()
|
||||||
|
' leggo StartCut da posizione primo pezzo
|
||||||
|
Dim sInfo As String = ""
|
||||||
|
Dim sSplitInfo() As String
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
EgtGetInfo(Id, MGR_RPT_PART & 1, sInfo)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||||
|
sSplitInfo = sInfo.Split(","c)
|
||||||
|
StringToDouble(sSplitInfo(1), m_BeamMachGroupM.dStartCut)
|
||||||
|
Else
|
||||||
|
m_BeamMachGroupM.dStartCut = 0
|
||||||
|
End If
|
||||||
|
' aggiorno lista pezzi
|
||||||
|
PartVMList.Clear()
|
||||||
|
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||||
|
While nRawPartId <> GDB_ID.NULL
|
||||||
|
Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||||
|
If nPartId <> GDB_ID.NULL Then
|
||||||
|
'''Dim NewBeam As BeamVM = New BeamVM(Me, nPartId, nRawPartId)
|
||||||
|
'''PartVMList.Add(NewBeam)
|
||||||
|
'''NewBeam.UpdateOffset()
|
||||||
|
End If
|
||||||
|
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub RefreshGroupData()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub UpdateUsage()
|
||||||
|
m_BeamMachGroupM.SetTotMat(dL)
|
||||||
|
m_BeamMachGroupM.SetMatForPart(0)
|
||||||
|
For Each Part In PartVMList
|
||||||
|
m_BeamMachGroupM.SetMatForPart(m_BeamMachGroupM.dMatForPart + Part.dL)
|
||||||
|
Next
|
||||||
|
NotifyPropertyChanged(NameOf(dUsage))
|
||||||
|
NotifyPropertyChanged(NameOf(dWaste))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function ReDrawBeamMachgroup() As Boolean
|
||||||
|
'' scrivo dati di tutti i pezzi
|
||||||
|
'Dim dPosX As Double = m_BeamMachGroupM.dStartCut
|
||||||
|
'Dim nIndex As Integer
|
||||||
|
'For nIndex = 0 To PartVMList.Count - 1
|
||||||
|
' If nIndex <> 0 Then
|
||||||
|
' Dim Beam As BeamVM = DirectCast(PartVMList(nIndex), BeamVM)
|
||||||
|
' dPosX += Beam.m_BeamM.dOffset
|
||||||
|
' End If
|
||||||
|
' PartVMList(nIndex).dPOSX = dPosX
|
||||||
|
' EgtSetInfo(Id, MGR_RPT_PART & nIndex + 1, PartVMList(nIndex).nPartId & "," & dPosX)
|
||||||
|
' dPosX += PartVMList(nIndex).dL
|
||||||
|
'Next
|
||||||
|
'' elimino eventuali successive info pezzi di troppo
|
||||||
|
'nIndex = PartVMList.Count + 1
|
||||||
|
'Dim sTemp As String = ""
|
||||||
|
'While EgtGetInfo(Id, MGR_RPT_PART & nIndex, sTemp)
|
||||||
|
' EgtSetInfo(Id, MGR_RPT_PART & nIndex, "")
|
||||||
|
'End While
|
||||||
|
'' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||||
|
'Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||||
|
'While nRawId <> GDB_ID.NULL
|
||||||
|
' EgtRemoveRawPart(nRawId)
|
||||||
|
' nRawId = EgtGetFirstRawPart()
|
||||||
|
'End While
|
||||||
|
'If Not ExecBeam(Map.refMainWindowVM.MainWindowM.sTempDir, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdType.RAWPART, False) Then Return False
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Sub MoveBeam(Beam As BeamVM, MoveDirection As MoveDirections)
|
||||||
|
Dim nBeamIndex As Integer = PartVMList.IndexOf(Beam)
|
||||||
|
If nBeamIndex = 0 AndAlso MoveDirection = MoveDirections.UP Then Return
|
||||||
|
If nBeamIndex = PartVMList.Count - 1 AndAlso MoveDirection = MoveDirections.DOWN Then Return
|
||||||
|
' se pezzo mosso diventa primo
|
||||||
|
Dim FirstBeam As BeamVM
|
||||||
|
If (nBeamIndex = 1 AndAlso MoveDirection = MoveDirections.UP) OrElse (nBeamIndex = 0 AndAlso MoveDirection = MoveDirections.DOWN) Then
|
||||||
|
'' resetto offset per vecchio primo
|
||||||
|
FirstBeam = DirectCast(PartVMList(0), BeamVM)
|
||||||
|
FirstBeam.ResetOffset()
|
||||||
|
End If
|
||||||
|
PartVMList.Move(nBeamIndex, nBeamIndex + MoveDirection)
|
||||||
|
ReDrawBeamMachgroup()
|
||||||
|
' aggiorno offset primo pezzo
|
||||||
|
FirstBeam = DirectCast(PartVMList(0), BeamVM)
|
||||||
|
FirstBeam.UpdateOffset()
|
||||||
|
FirstBeam.NotifyPropertyChanged(NameOf(FirstBeam.sOffset))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ReorderBeam()
|
||||||
|
Dim TempPartList = PartVMList.OrderBy(Function(x) x.dL).ToList()
|
||||||
|
' verifico se non sono già in oridne
|
||||||
|
Dim bSort As Boolean = False
|
||||||
|
For PartIndex = 0 To PartVMList.Count - 1
|
||||||
|
If PartVMList(PartIndex).nPartId <> TempPartList(PartIndex).nPartId Then
|
||||||
|
bSort = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not bSort Then Return
|
||||||
|
' resetto offset primo pezzo
|
||||||
|
Dim FirstBeam As BeamVM = DirectCast(PartVMList(0), BeamVM)
|
||||||
|
FirstBeam.ResetOffset()
|
||||||
|
PartVMList.Clear()
|
||||||
|
For Each Part In TempPartList
|
||||||
|
PartVMList.Add(Part)
|
||||||
|
Next
|
||||||
|
ReDrawBeamMachgroup()
|
||||||
|
' aggiorno offset primo pezzo
|
||||||
|
FirstBeam = DirectCast(PartVMList(0), BeamVM)
|
||||||
|
FirstBeam.UpdateOffset()
|
||||||
|
FirstBeam.NotifyPropertyChanged(NameOf(FirstBeam.sOffset))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "DeleteMachGroup"
|
||||||
|
|
||||||
|
' Returns a command that manage the MainWindow_Unloaded command
|
||||||
|
Public ReadOnly Property DeleteMachGroup_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDeleteMachGroup Is Nothing Then
|
||||||
|
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroup)
|
||||||
|
End If
|
||||||
|
Return m_cmdDeleteMachGroup
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
|
Public Overrides Sub DeleteMachGroup()
|
||||||
|
' elimino tutte le copie
|
||||||
|
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||||
|
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||||
|
While nRawPartId <> GDB_ID.NULL
|
||||||
|
EgtRemovePartFromRawPart(nBeamId)
|
||||||
|
EgtErase(nBeamId)
|
||||||
|
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||||
|
nBeamId = EgtGetFirstPartInRawPart(nRawPartId)
|
||||||
|
End While
|
||||||
|
' elimino MachGroup
|
||||||
|
EgtRemoveMachGroup(Me.Id)
|
||||||
|
' rimuovo dalla lista grezzi
|
||||||
|
Dim Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.IndexOf(Me)
|
||||||
|
If Index = 0 Then
|
||||||
|
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 0 Then
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
|
||||||
|
Else
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
||||||
|
End If
|
||||||
|
ElseIf Index = Map.refMachGroupPanelVM.MachGroupvmList.Count - 1 Then
|
||||||
|
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 2)
|
||||||
|
Else
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1)
|
||||||
|
End If
|
||||||
|
Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' DeleteMachGroup
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub OnBeamAdded(sender As Object, e As PartAddedEventArgs)
|
||||||
|
Dim BeamVM As BeamVM = New BeamVM(e.NewPart)
|
||||||
|
PartVMList.Add(BeamVM)
|
||||||
|
End Sub
|
||||||
|
Private Sub OnBeamRemoved(sender As Object, e As PartAddedEventArgs)
|
||||||
|
Dim BeamVM As BeamVM = PartVMList.FirstOrDefault(Function(x) x.PartM Is e.m_NewPart)
|
||||||
|
If Not IsNothing(BeamVM) Then PartVMList.Remove(BeamVM)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnBeamVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||||
|
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||||
|
For Each BeamVM As BeamVM In e.NewItems
|
||||||
|
AddHandler BeamVM.PropertyChanged, AddressOf OnBeamVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||||
|
For Each BeamVM As BeamVM In e.OldItems
|
||||||
|
RemoveHandler BeamVM.PropertyChanged, AddressOf OnBeamVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnBeamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
|
'Select Case e.PropertyName
|
||||||
|
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
||||||
|
'End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -5,7 +5,44 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class BeamVM
|
Public Class BeamVM
|
||||||
Inherits Core.BeamVM
|
Inherits PartVM
|
||||||
|
|
||||||
|
Public ReadOnly Property m_BeamM As BeamM
|
||||||
|
Get
|
||||||
|
Return m_PartM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sOffset As String
|
||||||
|
Get
|
||||||
|
Return LenToString(m_BeamM.dOffset, 3)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
Dim dValue As Double
|
||||||
|
If StringToLen(value, dValue) Then
|
||||||
|
Dim dOldValue As Double = m_BeamM.dOffset
|
||||||
|
m_BeamM.dOffset = dValue
|
||||||
|
'''Dim BeamMachGroup As BeamMachGroupVM = DirectCast(ParentMachGroup, BeamMachGroupVM)
|
||||||
|
'''If Not BeamMachGroup.ReDrawBeamMachgroup() Then
|
||||||
|
''' ' rispristino vecchio valore
|
||||||
|
''' m_BeamM.dOffset = dOldValue
|
||||||
|
''' BeamMachGroup.ReDrawBeamMachgroup()
|
||||||
|
'''End If
|
||||||
|
Else
|
||||||
|
NotifyPropertyChanged("sOffset")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property dOffset As Double
|
||||||
|
Get
|
||||||
|
Return m_BeamM.dOffset
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend Sub ResetOffset()
|
||||||
|
'm_BeamM.dOffset = RawPartConfiguration.dBeamDist
|
||||||
|
'NotifyPropertyChanged(NameOf(sOffset))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
@@ -17,6 +54,96 @@ Public Class BeamVM
|
|||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
'Sub New(nParentMachGroup As Core.MyMachGroupM, nPartId As Integer, nRawPartId As Integer)
|
||||||
|
' MyBase.New(nParentMachGroup, nPartId, nRawPartId)
|
||||||
|
' ' leggo info pezzo
|
||||||
|
' EgtGetInfo(nPartId, BTL_PRT_PROJ, nProjId)
|
||||||
|
' EgtGetInfo(nPartId, BTL_PRT_PDN, nPDN)
|
||||||
|
' EgtGetInfo(nPartId, BTL_PRT_NAM, sNAM)
|
||||||
|
' EgtGetInfo(nPartId, BTL_PRT_L, dL)
|
||||||
|
' EgtGetInfo(nPartId, BTL_PRT_W, dW)
|
||||||
|
' EgtGetInfo(nPartId, BTL_PRT_H, dH)
|
||||||
|
' EgtGetInfo(nPartId, BTL_PRT_CNT, nCNT)
|
||||||
|
' Dim nTemp As Integer = 0
|
||||||
|
' If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, nTemp) Then
|
||||||
|
' nTemp = 0
|
||||||
|
' End If
|
||||||
|
' SetRotated(nTemp)
|
||||||
|
' If Not EgtGetInfo(nPartId, BTL_PRT_INVERTED, nTemp) Then
|
||||||
|
' nTemp = 0
|
||||||
|
' End If
|
||||||
|
' SetInverted(nTemp)
|
||||||
|
' ' leggo PosX
|
||||||
|
' Dim sInfo As String = ""
|
||||||
|
' Dim Index = 1
|
||||||
|
' Dim sSplitInfo() As String
|
||||||
|
' Dim bFound As Boolean = False
|
||||||
|
' While EgtGetInfo(m_ParentMachGroup.Id, MGR_RPT_PART & Index, sInfo)
|
||||||
|
' If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||||
|
' sSplitInfo = sInfo.Split(","c)
|
||||||
|
' If sSplitInfo(0) = nPartId Then
|
||||||
|
' bFound = True
|
||||||
|
' Exit While
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Index += 1
|
||||||
|
' End While
|
||||||
|
' If bFound Then
|
||||||
|
' StringToDouble(sSplitInfo(1), dPOSX)
|
||||||
|
' End If
|
||||||
|
' ' leggo feature
|
||||||
|
' Dim nProcessingId As Integer = EgtGetFirstNameInGroup(nPartId, PROCESSINGS)
|
||||||
|
' Dim nFeatureId As Integer = EgtGetFirstInGroup(nProcessingId)
|
||||||
|
' While nFeatureId <> GDB_ID.NULL
|
||||||
|
' ' verifico che sia una feature
|
||||||
|
' Dim nGRP As Integer
|
||||||
|
' If EgtGetInfo(nFeatureId, BTL_FTR_GRP, nGRP) Then
|
||||||
|
' ' creo la feature
|
||||||
|
' '''FeatureList.Add(New BTLFeatureVM(Nothing, nFeatureId))
|
||||||
|
' End If
|
||||||
|
' nFeatureId = EgtGetNext(nFeatureId)
|
||||||
|
' End While
|
||||||
|
'End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
Friend Sub UpdateOffset()
|
||||||
|
' calcolo offset
|
||||||
|
'''Dim nBeamIndex As Integer = ParentMachGroup.PartMList.IndexOf(Me)
|
||||||
|
'''If nBeamIndex > 0 Then
|
||||||
|
''' m_BeamM.dOffset = dPOSX - (ParentMachGroup.PartMList(nBeamIndex - 1).dPOSX + ParentMachGroup.PartMList(nBeamIndex - 1).dL)
|
||||||
|
'''Else
|
||||||
|
''' Dim BeamMachGroup As BeamMachGroupVM = DirectCast(ParentMachGroup, BeamMachGroupVM)
|
||||||
|
''' m_BeamM.dOffset = BeamMachGroup.dStartCut
|
||||||
|
'''End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
|
Public Overrides Sub DeletePart()
|
||||||
|
' elimino pezzo copia
|
||||||
|
EgtRemovePartFromRawPart(Me.nPartId)
|
||||||
|
EgtErase(Me.nPartId)
|
||||||
|
'''' rimuovo dalla lista pezzi
|
||||||
|
'''Dim Index As Integer = ParentMachGroup.PartMList.IndexOf(Function(x) x.nPartId = Me.nPartId)
|
||||||
|
'''If Index = 0 Then
|
||||||
|
''' If ParentMachGroup.PartMList.Count > 0 Then
|
||||||
|
''' ParentMachGroup.SelPart = ParentMachGroup.PartMList(0)
|
||||||
|
''' Else
|
||||||
|
''' ParentMachGroup.SelPart = Nothing
|
||||||
|
''' End If
|
||||||
|
'''ElseIf Index = ParentMachGroup.PartMList.Count - 1 Then
|
||||||
|
''' If ParentMachGroup.PartMList.Count > 1 Then
|
||||||
|
''' ParentMachGroup.SelPart = ParentMachGroup.PartMList(ParentMachGroup.PartMList.Count - 2)
|
||||||
|
''' Else
|
||||||
|
''' ParentMachGroup.SelPart = Nothing
|
||||||
|
''' End If
|
||||||
|
'''Else
|
||||||
|
''' ParentMachGroup.SelPart = ParentMachGroup.PartMList(Index - 1)
|
||||||
|
'''End If
|
||||||
|
'''ParentMachGroup.PartMList.Remove(Me)
|
||||||
|
'''Dim BeamParentMachGroup As BeamMachGroupVM = DirectCast(ParentMachGroup, BeamMachGroupVM)
|
||||||
|
'''If Not IsNothing(BeamParentMachGroup) Then BeamParentMachGroup.ReDrawBeamMachgroup()
|
||||||
|
EgtDraw()
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -6,10 +6,16 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class MyMachGroupPanelVM
|
Public Class MyMachGroupPanelVM
|
||||||
Inherits Core.MyMachGroupPanelVM
|
Inherits NewMachGroupPanelVM
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Public ReadOnly Property m_MyMachGroupPanelM As MyMachGroupPanelM
|
||||||
|
Get
|
||||||
|
Return m_MachGroupPanelM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
@@ -19,12 +25,27 @@ Public Class MyMachGroupPanelVM
|
|||||||
' Recupero la macchina di default
|
' Recupero la macchina di default
|
||||||
Dim sDefaultMachine As String = String.Empty
|
Dim sDefaultMachine As String = String.Empty
|
||||||
GetMainPrivateProfileString(S_MACH, K_CURRMACH, "", sDefaultMachine)
|
GetMainPrivateProfileString(S_MACH, K_CURRMACH, "", sDefaultMachine)
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefMachGroupPanelVM(Me)
|
||||||
|
'''InitMachGroupPanel(True, Map.refMachinePanelVM.MachineList.ToList(), sDefaultMachine)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Protected Overrides Sub CreateMachGroupVMList()
|
||||||
|
Dim all As List(Of MachGroupVM) = (From MachGroupM In m_MachGroupPanelM.GetMachGroups()
|
||||||
|
Select If(DirectCast(MachGroupM, MyMachGroupM).nMachineType = MachineType.BEAM, New BeamMachGroupVM(MachGroupM), New MachGroupVM(MachGroupM))).ToList()
|
||||||
|
|
||||||
|
For Each MachGroupvM As MachGroupVM In all
|
||||||
|
AddHandler MachGroupvM.PropertyChanged, AddressOf OnMachGroupVMPropertyChanged
|
||||||
|
Next
|
||||||
|
|
||||||
|
MachGroupVMList = New ObservableCollection(Of MachGroupVM)(all)
|
||||||
|
AddHandler MachGroupVMList.CollectionChanged, AddressOf OnMachGroupVMListChanged
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Function FirstNotToBeProducedIndex() As Integer
|
Public Function FirstNotToBeProducedIndex() As Integer
|
||||||
Return MachGroupVMList.IndexOf(MachGroupVMList.FirstOrDefault(Function(x) DirectCast(x, MyMachGroupVM).bToBeProduced = False))
|
Return MachGroupVMList.IndexOf(MachGroupVMList.FirstOrDefault(Function(x) DirectCast(x, MyMachGroupVM).bToBeProduced = False))
|
||||||
End Function
|
End Function
|
||||||
@@ -40,14 +61,104 @@ Public Class MyMachGroupPanelVM
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Function InitMachGroupList(Optional bUseDefaults As Boolean = False) As Boolean
|
||||||
|
' Svuoto precedente lista di MachGroup
|
||||||
|
MachGroupVMList.Clear()
|
||||||
|
' aggiorno copie
|
||||||
|
MyMachGroupPanelM.UpdateDuplo()
|
||||||
|
' verifico se esistono già gruppi di lavorazione o se devo creare il primo
|
||||||
|
Dim bOk As Boolean = False
|
||||||
|
Dim nId = EgtGetFirstMachGroup()
|
||||||
|
If nId <> GDB_ID.NULL Then
|
||||||
|
bOk = EgtSetCurrMachGroup(nId)
|
||||||
|
End If
|
||||||
|
If Not bOk Then Return True
|
||||||
|
' carico lista dei gruppi di lavorazione
|
||||||
|
m_MachGroupPanelM.MachGroupMList = MyMachGroupPanelM.LoadMyMachGroups(Map.refMachinePanelVM.MachineList.ToList())
|
||||||
|
' elimino copie da cancellare
|
||||||
|
MyMachGroupPanelM.DeleteDuplo()
|
||||||
|
If bOk Then SelectedMachGroup = MachGroupVMList(0)
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function RefreshMachGroupList() As Boolean
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Overrides Sub AddMachGroup()
|
Public Overrides Sub AddMachGroup()
|
||||||
Dim SelMyMachine As MyMachine = Map.refMachinePanelVM.SelectedMachine
|
Dim SelMyMachine As MyMachine = Map.refMachinePanelVM.SelectedMachine
|
||||||
Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(SelMyMachine.Name, SelMyMachine.nType)
|
Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(SelMyMachine.Name, SelMyMachine.nType)
|
||||||
If Not IsNothing(MyMachGroupM) Then Return
|
If Not IsNothing(MyMachGroupM) Then Return
|
||||||
|
'' creo oggetto gruppo creato
|
||||||
|
'Dim sNewMachGroupName As String = String.Empty
|
||||||
|
'Dim sNewMachGroupMachineName As String = String.Empty
|
||||||
|
'EgtGetMachGroupName(nNewMachGroupID, sNewMachGroupName)
|
||||||
|
'EgtGetMachGroupMachineName(nNewMachGroupID, sNewMachGroupMachineName)
|
||||||
|
'Dim MyMachGroup As MyMachGroupM
|
||||||
|
'If Map.refMachinePanelVM.SelectedMachine.nType = MachineType.BEAM Then
|
||||||
|
' MyMachGroup = New BeamMachGroupVM(nNewMachGroupID, sNewMachGroupName, sNewMachGroupMachineName)
|
||||||
|
'Else
|
||||||
|
' MyMachGroup = New WallMachGroup(nNewMachGroupID, sNewMachGroupName, sNewMachGroupMachineName)
|
||||||
|
'End If
|
||||||
|
'' lo aggiungo alla lista
|
||||||
|
'MachGroupList.Add(MyMachGroup)
|
||||||
' e lo seleziono
|
' e lo seleziono
|
||||||
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Function OnPreSetCurrMachGroup() As Boolean
|
||||||
|
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overrides Function OnPostSetCurrMachGroup() As Boolean
|
||||||
|
' Imposto vista solo tavola
|
||||||
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
|
EgtSetView(VT.ISO_SW, False)
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' funzione che seleziona ultimo gruppo
|
||||||
|
Friend Sub SelLastMachGroup()
|
||||||
|
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||||
|
SelectedMachGroup = MachGroupVMList(MachGroupVMList.Count - 1)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function GetLastMachGroup() As MachGroupVM
|
||||||
|
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||||
|
Return MachGroupVMList(MachGroupVMList.Count - 1)
|
||||||
|
End If
|
||||||
|
Return Nothing
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Protected Overrides Sub OnMachGroupAdded(sender As Object, e As MachGroupAddedEventArgs)
|
||||||
|
Dim MachGroupVM As MachGroupVM = Nothing
|
||||||
|
Select Case DirectCast(e.NewMachGroupM, MyMachGroupM).nMachineType
|
||||||
|
Case Core.ConstBeam.MachineType.BEAM
|
||||||
|
MachGroupVM = New BeamMachGroupVM(e.NewMachGroupM)
|
||||||
|
Case Core.ConstBeam.MachineType.WALL
|
||||||
|
'MachGroupVM = New wallMachGroupVM(e.NewMachGroupM)
|
||||||
|
Case Core.ConstBeam.MachineType.NULL
|
||||||
|
Return
|
||||||
|
End Select
|
||||||
|
MachGroupVMList.Add(MachGroupVM)
|
||||||
|
NotifyPropertyChanged(NameOf(MachGroupVMList))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub OnMachGroupVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
|
Select Case e.PropertyName
|
||||||
|
'Case nameof(sender.sMATERIAL)
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' EVENTS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -7,9 +7,133 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public MustInherit Class MyMachGroupVM
|
Public MustInherit Class MyMachGroupVM
|
||||||
Inherits Core.MyMachGroupVM
|
Inherits MachGroupVM
|
||||||
|
|
||||||
Public Overrides ReadOnly Property Production_Background As SolidColorBrush
|
Public ReadOnly Property MyMachGroupM As MyMachGroupM
|
||||||
|
Get
|
||||||
|
Return m_MachGroupM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nMachineType As MachineType
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nMachineType
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dL As Double
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dL
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
MyMachGroupM.dL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dW As Double
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dW
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
MyMachGroupM.dW = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dH As Double
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dH
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
MyMachGroupM.dH = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dtStartTime As DateTime
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dtStartTime
|
||||||
|
End Get
|
||||||
|
Set(value As DateTime)
|
||||||
|
MyMachGroupM.dtStartTime = value
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dtEndTime As DateTime
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dtEndTime
|
||||||
|
End Get
|
||||||
|
Set(value As DateTime)
|
||||||
|
MyMachGroupM.dtEndTime = value
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property dUsage As Double
|
||||||
|
Get
|
||||||
|
Return If(MyMachGroupM.dMatForPart > 0 AndAlso MyMachGroupM.dTotMat > 0, MyMachGroupM.dMatForPart / MyMachGroupM.dTotMat * 100, 0)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property dWaste As Double
|
||||||
|
Get
|
||||||
|
Return If(MyMachGroupM.dMatForPart > 0 AndAlso MyMachGroupM.dTotMat > 0, (MyMachGroupM.dTotMat - MyMachGroupM.dMatForPart) / MyMachGroupM.dTotMat * 100, 0)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sUsage As String
|
||||||
|
Get
|
||||||
|
Return DoubleToString( dUsage, 3)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sWaste As String
|
||||||
|
Get
|
||||||
|
Return DoubleToString( dWaste, 3)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sMATERIAL As String
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.sMATERIAL
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
MyMachGroupM.sMATERIAL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' lista dei pezzi che sono nel grezzo
|
||||||
|
Protected m_PartVMList As New ObservableCollection(Of PartVM)
|
||||||
|
Public Property PartVMList As ObservableCollection(Of PartVM)
|
||||||
|
Get
|
||||||
|
Return m_PartVMList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of PartVM))
|
||||||
|
m_PartVMList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected m_SelPart As PartVM
|
||||||
|
Public Overridable Property SelPart As PartVM
|
||||||
|
Get
|
||||||
|
Return m_SelPart
|
||||||
|
End Get
|
||||||
|
Set(value As PartVM)
|
||||||
|
m_SelPart = value
|
||||||
|
' seleziono pezzo
|
||||||
|
EgtDeselectAll()
|
||||||
|
If Not IsNothing(value) Then EgtSelectObj(SelPart.nPartId)
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(SelPart))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nState As CalcStates
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nCALC_State
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||||
Get
|
Get
|
||||||
If dtEndTime <> DateTime.MinValue Then ' barra finita
|
If dtEndTime <> DateTime.MinValue Then ' barra finita
|
||||||
Return Brushes.LightGray
|
Return Brushes.LightGray
|
||||||
@@ -64,14 +188,12 @@ Public MustInherit Class MyMachGroupVM
|
|||||||
' definizione comandi
|
' definizione comandi
|
||||||
Private m_cmdProduceMachGroup As ICommand
|
Private m_cmdProduceMachGroup As ICommand
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
|
||||||
|
|
||||||
Sub New(MyMachGroupM As MyMachGroupM)
|
Sub New(MyMachGroupM As MyMachGroupM)
|
||||||
MyBase.New(MyMachGroupM)
|
MyBase.New(MyMachGroupM)
|
||||||
|
'aggiorno lista pezzi
|
||||||
|
RefreshPartList()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
Friend Sub ResetProduce()
|
Friend Sub ResetProduce()
|
||||||
@@ -83,6 +205,34 @@ Public MustInherit Class MyMachGroupVM
|
|||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
Public MustOverride Sub RefreshPartList()
|
||||||
|
|
||||||
|
Public MustOverride Sub RefreshGroupData()
|
||||||
|
|
||||||
|
Public Overridable Sub DeleteMachGroup()
|
||||||
|
' elimino tutte le copie
|
||||||
|
Dim nRawPartId As Integer = EgtGetFirstRawPart()
|
||||||
|
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||||
|
While nRawPartId <> GDB_ID.NULL
|
||||||
|
EgtRemovePartFromRawPart(nBeamId)
|
||||||
|
EgtErase(nBeamId)
|
||||||
|
nRawPartId = EgtGetNextRawPart(nRawPartId)
|
||||||
|
nBeamId = EgtGetFirstPartInRawPart(nRawPartId)
|
||||||
|
End While
|
||||||
|
' elimino MachGroup
|
||||||
|
EgtRemoveMachGroup(Me.Id)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub CalcMachGroupUpdate()
|
||||||
|
MyMachGroupM.SetState(CalcStates.OK)
|
||||||
|
For Each Part In PartVMList
|
||||||
|
If Part.nGlobalState > 0 AndAlso nState = CalcStates.OK Then
|
||||||
|
MyMachGroupM.SetState(CalcStates.ERROR_)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Function CnFilePath() As String
|
Public Function CnFilePath() As String
|
||||||
Return Map.refSupervisorManagerVM.CurrProd.sProdDirPath & "\" & Name & ".cnc"
|
Return Map.refSupervisorManagerVM.CurrProd.sProdDirPath & "\" & Name & ".cnc"
|
||||||
End Function
|
End Function
|
||||||
@@ -125,7 +275,7 @@ Public MustInherit Class MyMachGroupVM
|
|||||||
DbControllers.m_MachGroupController.UpdateOrder(Map.refSupervisorManagerVM.CurrProd.nProdId, Id, NewIndex)
|
DbControllers.m_MachGroupController.UpdateOrder(Map.refSupervisorManagerVM.CurrProd.nProdId, Id, NewIndex)
|
||||||
Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.Move(OldIndex, NewIndex)
|
Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.Move(OldIndex, NewIndex)
|
||||||
|
|
||||||
NotifyPropertyChanged(NameOf(nCALC_State))
|
NotifyPropertyChanged(NameOf(nState))
|
||||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -9,23 +9,401 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public MustInherit Class PartVM
|
Public MustInherit Class PartVM
|
||||||
Inherits Core.PartVM
|
Inherits VMBase
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Protected m_PartM As PartM
|
||||||
|
Public ReadOnly Property PartM As PartM
|
||||||
|
Get
|
||||||
|
Return m_PartM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ParentMachGroup As MyMachGroupM
|
||||||
|
Get
|
||||||
|
Return m_PartM.ParentMachGroup
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Id geometrico del pezzo
|
||||||
|
Public ReadOnly Property nPartId As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nPartId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Proj del pezzo
|
||||||
|
Public Property nProjId As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nProjId
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nProjId = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Info del pezzo
|
||||||
|
Public ReadOnly Property nPDN As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nPDN
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sNAM As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.sNAM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dL As Double
|
||||||
|
Get
|
||||||
|
Return m_PartM.dL
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_PartM.dL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dW As Double
|
||||||
|
Get
|
||||||
|
Return m_PartM.dW
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_PartM.dW = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dH As Double
|
||||||
|
Get
|
||||||
|
Return m_PartM.dH
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_PartM.dH = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sPOSX As String
|
||||||
|
Get
|
||||||
|
Return LenToString(m_PartM.dPOSX, 3)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
StringToLen(value, m_PartM.dPOSX)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Property dPOSX As Double
|
||||||
|
Get
|
||||||
|
Return m_PartM.dPOSX
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_PartM.dPOSX = value
|
||||||
|
NotifyPropertyChanged(NameOf(sPOSX))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCNT As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCNT
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nCNT = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sINVERTED As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.nINVERTED & "°"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sROTATED As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.nROTATED & "°"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sMATERIAL As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.sMATERIAL
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_PartM.sMATERIAL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nGlobalState As CalcStates
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_GlobalState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nState As CalcStates
|
||||||
|
Get
|
||||||
|
Return m_PartM.nProductionState
|
||||||
|
End Get
|
||||||
|
Set(value As CalcStates)
|
||||||
|
m_PartM.SetProductionState(value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||||
|
Get
|
||||||
|
If dtEndTime <> DateTime.MinValue Then ' barra finita
|
||||||
|
Return Brushes.LightGray
|
||||||
|
ElseIf dtStartTime <> DateTime.MinValue Then ' barra iniziata
|
||||||
|
Return Brushes.Green
|
||||||
|
Else ' barra in coda
|
||||||
|
Return Brushes.White
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nCALC_ERR As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_ERR
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sCALC_MSG As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.sCALC_MSG
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCALC_ROT As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_ROT
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nCALC_ROT = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCALC_FALL As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_FALL
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nCALC_FALL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCALC_TIME As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_TIME
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nCALC_TIME = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' lista delle feature del pezzo
|
||||||
|
Protected m_FeatureVMList As ObservableCollection(Of BTLFeatureVM)
|
||||||
|
Public Property FeatureVMList As ObservableCollection(Of BTLFeatureVM)
|
||||||
|
Get
|
||||||
|
Return m_FeatureVMList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of BTLFeatureVM))
|
||||||
|
m_FeatureVMList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected m_SelFeatureVM As BTLFeatureVM
|
||||||
|
Public Property SelFeatureVM As BTLFeatureVM
|
||||||
|
Get
|
||||||
|
Return m_SelFeatureVM
|
||||||
|
End Get
|
||||||
|
Set(value As BTLFeatureVM)
|
||||||
|
m_SelFeatureVM = value
|
||||||
|
EgtDeselectAll()
|
||||||
|
If Not IsNothing(value) Then EgtSelectObj(m_SelFeatureVM.nFeatureId)
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(m_SelFeatureVM))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dtStartTime As DateTime
|
||||||
|
Get
|
||||||
|
Return m_PartM.dtStartTime
|
||||||
|
End Get
|
||||||
|
Set(value As DateTime)
|
||||||
|
m_PartM.dtStartTime = value
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dtEndTime As DateTime
|
||||||
|
Get
|
||||||
|
Return m_PartM.dtEndTime
|
||||||
|
End Get
|
||||||
|
Set(value As DateTime)
|
||||||
|
m_PartM.dtEndTime = value
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' definizione comandi
|
||||||
|
Private m_cmdDeletePart As ICommand
|
||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New(PartM As PartM)
|
Sub New(PartM As PartM)
|
||||||
MyBase.New(PartM)
|
m_PartM = PartM
|
||||||
|
AddHandler m_PartM.BTLFeatureAdded, AddressOf OnBTLFeatureAdded
|
||||||
|
CreateBTLFeatureVMList()
|
||||||
End Sub
|
End Sub
|
||||||
|
'Sub New(nParentMachGroup As MyMachGroupM, nPartId As Integer)
|
||||||
|
' m_ParentMachGroup = nParentMachGroup
|
||||||
|
' SetPartId(nPartId)
|
||||||
|
' m_FeatureVMList = New ObservableCollection(Of BTLFeatureM)
|
||||||
|
'End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
Private Sub CreateBTLFeatureVMList()
|
||||||
|
Dim all As List(Of BTLFeatureVM) = (From BTLFeatureM In m_PartM.GetBTLFeatures()
|
||||||
|
Select New BTLFeatureVM(BTLFeatureM)).ToList()
|
||||||
|
|
||||||
|
For Each BTLFeatureVM As BTLFeatureVM In all
|
||||||
|
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
||||||
|
Next
|
||||||
|
|
||||||
|
m_FeatureVMList = New ObservableCollection(Of BTLFeatureVM)(all)
|
||||||
|
AddHandler m_FeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||||
|
Public Sub CalcPartUpdate(bCalc As Boolean, ERR As Integer, ROT As Integer, FALL As Integer, MSG As String)
|
||||||
|
If Not bCalc Then
|
||||||
|
nState = CalcStates.NOTCALCULATED
|
||||||
|
m_PartM.nCALC_ERR = 0
|
||||||
|
m_PartM.nCALC_ROT = 0
|
||||||
|
m_PartM.nCALC_FALL = 0
|
||||||
|
m_PartM.sCALC_MSG = ""
|
||||||
|
Else
|
||||||
|
m_PartM.nCALC_ERR = ERR
|
||||||
|
m_PartM.nCALC_ROT = ROT
|
||||||
|
m_PartM.nCALC_FALL = 0
|
||||||
|
m_PartM.sCALC_MSG = MSG
|
||||||
|
If ERR = 0 Then
|
||||||
|
nState = CalcStates.OK
|
||||||
|
ElseIf ERR > 1 Then
|
||||||
|
nState = CalcStates.ERROR_
|
||||||
|
ElseIf ERR < 1 Then
|
||||||
|
nState = CalcStates.NOTCALCULATED
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||||
|
Public Sub CalcFeatureUpdate()
|
||||||
|
m_PartM.nCALC_GlobalState = nState
|
||||||
|
For Each Feature In FeatureVMList
|
||||||
|
If Not Feature.bDO Then
|
||||||
|
|
||||||
|
ElseIf Feature.nState < 0 Then
|
||||||
|
m_PartM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
||||||
|
Exit For
|
||||||
|
ElseIf Feature.nState > 0 AndAlso m_PartM.nCALC_GlobalState = CalcStates.OK Then
|
||||||
|
m_PartM.nCALC_GlobalState = CalcStates.ERROR_
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "DeletePart"
|
||||||
|
|
||||||
|
' Returns a command that manage the MainWindow_Unloaded command
|
||||||
|
Public ReadOnly Property DeletePart_Command() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDeletePart Is Nothing Then
|
||||||
|
m_cmdDeletePart = New Command(AddressOf DeletePart)
|
||||||
|
End If
|
||||||
|
Return m_cmdDeletePart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
|
Public Overridable Sub DeletePart()
|
||||||
|
EgtRemovePartFromRawPart(m_PartM.nPartId)
|
||||||
|
' elimino pezzo copia
|
||||||
|
EgtErase(m_PartM.nPartId)
|
||||||
|
' elimino info pezzo su mach group
|
||||||
|
Dim sInfo As String = ""
|
||||||
|
Dim Index As Integer = 1
|
||||||
|
Dim sSplitInfo() As String
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
'''While EgtGetInfo(m_ParentMachGroup.Id, MGR_RPT_PART & Index, sInfo)
|
||||||
|
''' If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||||
|
''' sSplitInfo = sInfo.Split(","c)
|
||||||
|
''' If bFound Then
|
||||||
|
''' EgtSetInfo(m_ParentMachGroup.Id, MGR_RPT_PART & Index - 1, sInfo)
|
||||||
|
''' End If
|
||||||
|
''' If sSplitInfo(0) = nPartId Then
|
||||||
|
''' bFound = True
|
||||||
|
''' End If
|
||||||
|
''' End If
|
||||||
|
''' Index += 1
|
||||||
|
'''End While
|
||||||
|
'''If bFound Then
|
||||||
|
''' EgtSetInfo(m_ParentMachGroup.Id, MGR_RPT_PART & Index - 1, "")
|
||||||
|
'''End If
|
||||||
|
'''' rimuovo dalla lista pezzi
|
||||||
|
'''Index = ParentMachGroup.PartMList.IndexOf(Me)
|
||||||
|
'''If Index = 0 Then
|
||||||
|
''' If ParentMachGroup.PartMList.Count > 0 Then
|
||||||
|
''' ParentMachGroup.SelPart = ParentMachGroup.PartMList(0)
|
||||||
|
''' Else
|
||||||
|
''' ParentMachGroup.SelPart = Nothing
|
||||||
|
''' End If
|
||||||
|
'''ElseIf Index = ParentMachGroup.PartMList.Count - 1 Then
|
||||||
|
''' If ParentMachGroup.PartMList.Count > 1 Then
|
||||||
|
''' ParentMachGroup.SelPart = ParentMachGroup.PartMList(ParentMachGroup.PartMList.Count - 2)
|
||||||
|
''' Else
|
||||||
|
''' ParentMachGroup.SelPart = Nothing
|
||||||
|
''' End If
|
||||||
|
'''Else
|
||||||
|
''' ParentMachGroup.SelPart = ParentMachGroup.PartMList(Index - 1)
|
||||||
|
'''End If
|
||||||
|
'''ParentMachGroup.PartMList.Remove(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' DeletePart
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub OnBTLFeatureAdded(sender As Object, e As BTLFeatureAddedEventArgs)
|
||||||
|
Dim BTLFeatureVM As BTLFeatureVM = New BTLFeatureVM(e.NewBTLFeature)
|
||||||
|
FeatureVMList.Add(BTLFeatureVM)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnBTLFeatureVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||||
|
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||||
|
For Each BTLFeatureVM As BTLFeatureVM In e.NewItems
|
||||||
|
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||||
|
For Each BTLFeatureVM As BTLFeatureVM In e.OldItems
|
||||||
|
RemoveHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnBTLFeatureVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
|
'Select Case e.PropertyName
|
||||||
|
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
||||||
|
'End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ Imports ISOCNC.Remoting
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
|
|
||||||
Class MachManaging
|
Class MachManaging
|
||||||
|
|
||||||
@@ -104,7 +103,7 @@ Class MachManaging
|
|||||||
nP_Machgroup = 0 AndAlso
|
nP_Machgroup = 0 AndAlso
|
||||||
nP_Part = 0 AndAlso
|
nP_Part = 0 AndAlso
|
||||||
nP_State = PartState.NULL) AndAlso
|
nP_State = PartState.NULL) AndAlso
|
||||||
Tpa.opState = MachineOperatingState.Pending AndAlso Tpa.remObject.MachineOperativeStatus = MachineOperatingState.Pending Then
|
Tpa.opState = MachineOperatingState.Pending AndAlso tpa.remObject.MachineOperativeStatus = MachineOperatingState.Pending Then
|
||||||
' verifico se c'e' un programma da lanciare
|
' verifico se c'e' un programma da lanciare
|
||||||
SendNextProgram()
|
SendNextProgram()
|
||||||
' attesa per essere sicuro che abbia scritto e riletto variabili
|
' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||||
@@ -122,19 +121,19 @@ Class MachManaging
|
|||||||
' recupero pezzo
|
' recupero pezzo
|
||||||
Dim Part As PartVM = MachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nP_Part)
|
Dim Part As PartVM = MachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nP_Part)
|
||||||
' scrivo stato start
|
' scrivo stato start
|
||||||
Part.nCALC_State = 1
|
Part.nState = 1
|
||||||
Part.dtStartTime = dtStart
|
Part.dtStartTime = dtStart
|
||||||
Part.NotifyPropertyChanged(NameOf(Part.nCALC_State))
|
Part.NotifyPropertyChanged(NameOf(Part.nState))
|
||||||
' azzero variabile per far ripartire macchina
|
' azzero variabile per far ripartire macchina
|
||||||
Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||||
' se nessun pezzo della barra diverso da quello corrente e' in start
|
' se nessun pezzo della barra diverso da quello corrente e' in start
|
||||||
If Not MachGroup.PartVMList.Any(Function(x) x.nPartId <> nP_Part AndAlso x.nCALC_State = 1) Then
|
If Not MachGroup.PartVMList.Any(Function(x) x.nPartId <> nP_Part AndAlso x.nState = 1) Then
|
||||||
' scrivo data start su Db barra
|
' scrivo data start su Db barra
|
||||||
DbControllers.m_MachGroupController.UpdateStart(nP_Prod, nP_Machgroup, dtStart)
|
DbControllers.m_MachGroupController.UpdateStart(nP_Prod, nP_Machgroup, dtStart)
|
||||||
' scrivo stato start
|
' scrivo stato start
|
||||||
MachGroup.MyMachGroupM.SetState(1)
|
MachGroup.MyMachGroupM.SetState(1)
|
||||||
MachGroup.dtStartTime = dtStart
|
MachGroup.dtStartTime = dtStart
|
||||||
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.nCALC_State))
|
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.nState))
|
||||||
End If
|
End If
|
||||||
' attesa per essere sicuro che abbia scritto e riletto variabili
|
' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||||
Threading.Thread.Sleep(300)
|
Threading.Thread.Sleep(300)
|
||||||
@@ -147,19 +146,19 @@ Class MachManaging
|
|||||||
' recupero pezzo
|
' recupero pezzo
|
||||||
Dim Part As PartVM = MachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nP_Part)
|
Dim Part As PartVM = MachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nP_Part)
|
||||||
' scrivo stato end
|
' scrivo stato end
|
||||||
Part.nCALC_State = 2
|
Part.nState = 2
|
||||||
Part.dtEndTime = dtEnd
|
Part.dtEndTime = dtEnd
|
||||||
Part.NotifyPropertyChanged(NameOf(Part.nCALC_State))
|
Part.NotifyPropertyChanged(NameOf(Part.nState))
|
||||||
' azzero variabile per far ripartire macchina
|
' azzero variabile per far ripartire macchina
|
||||||
Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||||
' se tutti i pezzi della barra sono in end
|
' se tutti i pezzi della barra sono in end
|
||||||
If MachGroup.PartVMList.All(Function(x) x.nCALC_State >= 2) Then
|
If MachGroup.PartVMList.All(Function(x) x.nState >= 2) Then
|
||||||
' scrivo data end su Db barra
|
' scrivo data end su Db barra
|
||||||
DbControllers.m_MachGroupController.UpdateEnd(nP_Prod, nP_Machgroup, dtEnd)
|
DbControllers.m_MachGroupController.UpdateEnd(nP_Prod, nP_Machgroup, dtEnd)
|
||||||
' scrivo stato end
|
' scrivo stato end
|
||||||
MachGroup.MyMachGroupM.SetState(2)
|
MachGroup.MyMachGroupM.SetState(2)
|
||||||
MachGroup.dtEndTime = dtEnd
|
MachGroup.dtEndTime = dtEnd
|
||||||
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.nCALC_State))
|
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.nState))
|
||||||
' azzero tutte le variabilli per iniziare barra successiva
|
' azzero tutte le variabilli per iniziare barra successiva
|
||||||
Tpa.RWVariableManager.WriteVar(P_PROD, 0)
|
Tpa.RWVariableManager.WriteVar(P_PROD, 0)
|
||||||
Tpa.RWVariableManager.WriteVar(P_MACHGROUP, 0)
|
Tpa.RWVariableManager.WriteVar(P_MACHGROUP, 0)
|
||||||
@@ -290,7 +289,7 @@ Class MachManaging
|
|||||||
Me.OnDispose()
|
Me.OnDispose()
|
||||||
m_Tpa.OnDispose()
|
m_Tpa.OnDispose()
|
||||||
' termino thread di comunicazione
|
' termino thread di comunicazione
|
||||||
MachineCommThread.StopThread()
|
CommunicationThread.StopThread()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub SetOPState()
|
Public Sub SetOPState()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Imports EgtBEAMWALL.Core.ConstMachComm
|
Imports EgtBEAMWALL.Core.ConstMachComm
|
||||||
|
|
||||||
Class MachineCommThread
|
Class CommunicationThread
|
||||||
|
|
||||||
' variabile che ferma il ciclo
|
' variabile che ferma il ciclo
|
||||||
Private Shared m_Stop As Boolean = False
|
Private Shared m_Stop As Boolean = False
|
||||||
|
|||||||
@@ -186,10 +186,6 @@ Public Class MainWindowM
|
|||||||
m_sWallRoot = m_sDataRoot & "\" & WALL_DIR
|
m_sWallRoot = m_sDataRoot & "\" & WALL_DIR
|
||||||
End If
|
End If
|
||||||
m_sWarehouseRoot = m_sDataRoot & "\" & WAREHOUSE_DIR
|
m_sWarehouseRoot = m_sDataRoot & "\" & WAREHOUSE_DIR
|
||||||
' imposto cartelle dei progetti
|
|
||||||
ProjectFileVM.Init(sProjsDir, sProdsDir)
|
|
||||||
' Impostazione path Ini file DataGrid
|
|
||||||
DataGridColumnsIniFile.m_sDataGridColumnsIniFile = m_sConfigDir & "\" & DATAGRIDCOLUMNS_FILE_NAME
|
|
||||||
' Verifico indice di istanza
|
' Verifico indice di istanza
|
||||||
ManageInstance()
|
ManageInstance()
|
||||||
' Imposto tipo di chiave
|
' Imposto tipo di chiave
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
Imports System.Threading
|
Imports EgtBEAMWALL.Core
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
|
|
||||||
Public Class MainWindowVM
|
Public Class MainWindowVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
Private m_ViewerOptimizerCommThread As Thread
|
|
||||||
|
|
||||||
' Riferimento al Model della MainWindow
|
' Riferimento al Model della MainWindow
|
||||||
Private m_MainWindowM As MainWindowM
|
Private m_MainWindowM As MainWindowM
|
||||||
Friend ReadOnly Property MainWindowM As MainWindowM
|
Friend ReadOnly Property MainWindowM As MainWindowM
|
||||||
@@ -79,16 +76,6 @@ Public Class MainWindowVM
|
|||||||
' apro in modalita' VIEW
|
' apro in modalita' VIEW
|
||||||
' Map.refMainMenuVM.SelPage = Pages.VIEW
|
' Map.refMainMenuVM.SelPage = Pages.VIEW
|
||||||
|
|
||||||
|
|
||||||
' inizializzo thread di aggiornamento e comunicazione con DB
|
|
||||||
' creo thread gestione macchina
|
|
||||||
m_ViewerOptimizerCommThread = New Thread(Sub()
|
|
||||||
ViewerOptimizerCommThread.ViewerOptimizerCommThreadFunction()
|
|
||||||
End Sub)
|
|
||||||
' avvio thread di gestione della macchina che avvia la connessione
|
|
||||||
m_ViewerOptimizerCommThread.Start()
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
@@ -136,8 +123,6 @@ Public Class MainWindowVM
|
|||||||
Public Sub CloseApplication()
|
Public Sub CloseApplication()
|
||||||
' disconnetto comunicazione con macchina
|
' disconnetto comunicazione con macchina
|
||||||
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.DISCONNECT))
|
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.DISCONNECT))
|
||||||
' termino thread di comunicazione con Db ed altri programmi
|
|
||||||
ViewerOptimizerCommThread.StopThread()
|
|
||||||
' Chiudo la finestra principale del programma
|
' Chiudo la finestra principale del programma
|
||||||
Application.Current.MainWindow.Close()
|
Application.Current.MainWindow.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -1,22 +1,114 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.IO
|
||||||
Imports System.IO
|
|
||||||
Imports EgtBEAMWALL.Core
|
Imports EgtBEAMWALL.Core
|
||||||
Imports EgtBEAMWALL.Core.ConstBeam
|
Imports EgtBEAMWALL.Core.ConstBeam
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class OpenProjectFileDialogVM
|
Public Class OpenProjectFileDialogVM
|
||||||
Inherits Core.OpenProjectFileDialogVM
|
Inherits VMBase
|
||||||
|
|
||||||
Public Overrides Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing) As Boolean?
|
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
|
Private m_ProjectType As ProjectType
|
||||||
|
|
||||||
|
Private m_FileNameTxBl As TextBlock
|
||||||
|
|
||||||
|
Private m_sDirectory As String
|
||||||
|
Public Property Directory As String
|
||||||
|
Get
|
||||||
|
Return m_sDirectory
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sDirectory = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sFilter As String
|
||||||
|
Public Property Filter As String
|
||||||
|
Get
|
||||||
|
Return m_sFilter
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sFilter = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sFileNameFilter As Predicate(Of String)
|
||||||
|
Public Property FileNameFilter As Predicate(Of String)
|
||||||
|
Get
|
||||||
|
Return m_sFileNameFilter
|
||||||
|
End Get
|
||||||
|
Set(value As Predicate(Of String))
|
||||||
|
m_sFileNameFilter = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_sExtensions As New List(Of String)
|
||||||
|
Public ReadOnly Property Extensions As List(Of String)
|
||||||
|
Get
|
||||||
|
Return m_sExtensions
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_ProjectList As New List(Of ProjectFileVM)
|
||||||
|
Public ReadOnly Property ProjectList As List(Of ProjectFileVM)
|
||||||
|
Get
|
||||||
|
Return m_ProjectList
|
||||||
|
End Get
|
||||||
|
'Set(value As List(Of ProjFile))
|
||||||
|
' m_ProjList = value
|
||||||
|
' NotifyPropertyChanged("ProjList")
|
||||||
|
'End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SelProject As ProjectFileVM
|
||||||
|
Public Property SelProject As ProjectFileVM
|
||||||
|
Get
|
||||||
|
Return m_SelProject
|
||||||
|
End Get
|
||||||
|
Set(value As ProjectFileVM)
|
||||||
|
m_SelProject = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_FileName As String
|
||||||
|
Public Property FileName As String
|
||||||
|
Get
|
||||||
|
Return m_FileName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_FileName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#Region "Messages"
|
||||||
|
|
||||||
|
Public ReadOnly Property OpenMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(MSG_EGTSAVEFILEDIALOG + 6)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property CancelMsg As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(MSG_EGTSAVEFILEDIALOG + 2)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdProjectDoubleClick As ICommand
|
||||||
|
|
||||||
|
Public Function Init(ProjectType As ProjectType, Optional ProjectList As List(Of ProjectFileVM) = Nothing) As Boolean?
|
||||||
m_ProjectType = ProjectType
|
m_ProjectType = ProjectType
|
||||||
' carico colonne
|
If IsNothing(ProjectList) OrElse ProjectList.Count = 0 Then
|
||||||
LoadColumns(ProjectType)
|
|
||||||
NotifyPropertyChanged(NameOf(SearchColumnList))
|
|
||||||
m_SelSearchColumn = m_SearchColumnList(0)
|
|
||||||
' carico lista progetti
|
|
||||||
If IsNothing(CurrProjectList) OrElse CurrProjectList.Count = 0 Then
|
|
||||||
' leggo da db
|
' leggo da db
|
||||||
If ProjectType = ProjectType.PROD Then
|
If ProjectType = ProjectType.PROJ Then
|
||||||
|
'Dim DbProjectList As New List(Of ProjFileM)
|
||||||
|
'DbProjectList = DbControllers.m_ProjController.GetLastDesc(50)
|
||||||
|
'For Each Project In DbProjectList
|
||||||
|
' m_ProjectList.Add(New ProjFileVM(Project))
|
||||||
|
'Next
|
||||||
|
ElseIf ProjectType = ProjectType.PROD Then
|
||||||
Dim DbProjectList As New List(Of ProdFileM)
|
Dim DbProjectList As New List(Of ProdFileM)
|
||||||
DbProjectList = DbControllers.m_ProdController.GetLastDesc(50)
|
DbProjectList = DbControllers.m_ProdController.GetLastDesc(50)
|
||||||
For Each Project In DbProjectList
|
For Each Project In DbProjectList
|
||||||
@@ -24,11 +116,76 @@ Public Class OpenProjectFileDialogVM
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
m_ProjectList = New ObservableCollection(Of ProjectFileVM)(CurrProjectList)
|
m_ProjectList = ProjectList
|
||||||
NotifyPropertyChanged(NameOf(ProjectList))
|
|
||||||
End If
|
End If
|
||||||
m_ProjectList_View = CollectionViewSource.GetDefaultView(m_ProjectList)
|
|
||||||
m_ProjectList_View.Filter = AddressOf ProjectFilter
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function VerifySelected() As Boolean
|
||||||
|
Dim AllFilesInDir As IEnumerable(Of String)
|
||||||
|
If m_ProjectType = Core.ConstBeam.ProjectType.PROJ Then
|
||||||
|
' verifico se esiste ProdId
|
||||||
|
AllFilesInDir = IO.Directory.EnumerateFiles(SelProject.sProjDirPath)
|
||||||
|
ElseIf m_ProjectType = Core.ConstBeam.ProjectType.PROD Then
|
||||||
|
AllFilesInDir = IO.Directory.EnumerateFiles(SelProject.sProdDirPath)
|
||||||
|
End If
|
||||||
|
For Each File In AllFilesInDir
|
||||||
|
If Path.GetExtension(File).ToLower() = ".nge" Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Private Sub m_FileNameTxBl_MouseDown(sender As Object, e As Windows.Input.MouseButtonEventArgs) Handles FileNameList.MouseDoubleClick
|
||||||
|
' Dim src As DependencyObject = VisualTreeHelper.GetParent(DirectCast(e.OriginalSource, DependencyObject))
|
||||||
|
' ' verifico che venga clickato un item, non lo spazio vuoto o la scrollbar
|
||||||
|
' If Not TypeOf src Is ListBoxItem Then
|
||||||
|
' src = Utility.FindAncestor(Of ListBoxItem)(src)
|
||||||
|
' End If
|
||||||
|
' If IsNothing(src) OrElse src.[GetType]() <> GetType(ListBoxItem) Then
|
||||||
|
' e.Handled = True
|
||||||
|
' Else
|
||||||
|
' If Not IsNothing(m_SelectedFile) Then
|
||||||
|
' m_FileName = SelectedFile
|
||||||
|
' DialogResult = True
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Private Sub OpenBtn_Click(sender As Object, e As RoutedEventArgs) Handles OpenBtn.Click
|
||||||
|
' If Not IsNothing(m_SelectedFile) Then
|
||||||
|
' m_FileName = SelectedFile
|
||||||
|
' DialogResult = True
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "ProjectDoubleClick"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do New.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property ProjectDoubleClick_Command As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdProjectDoubleClick Is Nothing Then
|
||||||
|
m_cmdProjectDoubleClick = New Command(AddressOf ProjDoubleClick)
|
||||||
|
End If
|
||||||
|
Return m_cmdProjectDoubleClick
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the New. This method is invoked by the NewCommand.
|
||||||
|
''' </summary>
|
||||||
|
Friend Sub ProjDoubleClick(ByVal param As Object)
|
||||||
|
If VerifySelected() Then
|
||||||
|
RaiseEvent m_CloseWindow(True)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' ProjectDoubleClick
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -3,21 +3,181 @@ Imports EgtBEAMWALL.Core
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class ProdFileVM
|
Public Class ProdFileVM
|
||||||
Inherits Core.ProdFileVM
|
Inherits ProjectFileVM
|
||||||
|
|
||||||
|
Public ReadOnly Property ProdFileM As ProdFileM
|
||||||
|
Get
|
||||||
|
Return m_ProjectFileM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public ReadOnly Property nProjIdList As List(Of Integer)
|
||||||
|
Get
|
||||||
|
Return ProdFileM.nProjIdList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property nProdId As Integer
|
||||||
|
Get
|
||||||
|
Return ProdFileM.nProdId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend Overrides ReadOnly Property sProdDirPath As String
|
||||||
|
Get
|
||||||
|
Dim sPath As String = String.Empty
|
||||||
|
If IsNothing(ProdFileM.nProdId) OrElse ProdFileM.nProdId = 0 Then Return String.Empty
|
||||||
|
Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Overrides ReadOnly Property sProdPath As String
|
||||||
|
Get
|
||||||
|
Dim sPath As String = String.Empty
|
||||||
|
If IsNothing(ProdFileM.nProdId) OrElse ProdFileM.nProdId = 0 Then Return String.Empty
|
||||||
|
Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overrides Property bIsNew As Boolean
|
||||||
|
Get
|
||||||
|
Return ProdFileM.bIsNew
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ProdFileM.bIsNew = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' nome del file mostrato nella finestra OpenProjFileDialog
|
||||||
|
Public ReadOnly Property OpenFileName As String
|
||||||
|
Get
|
||||||
|
Return ProdFileM.nProdId.ToString("0000")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
#Region "CONSTRUCTORS"
|
||||||
|
|
||||||
Sub New(ProdFileM As ProdFileM)
|
Sub New(ProdFileM As ProdFileM)
|
||||||
MyBase.New(ProdFileM)
|
m_ProjectFileM = ProdFileM
|
||||||
' aggiungo nome btl
|
|
||||||
Dim sBTLFileName As String = ""
|
|
||||||
For Each CurrProj In nProjIdList
|
|
||||||
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(CurrProj)
|
|
||||||
If Not IsNothing(TempProj) Then sBTLFileName &= TempProj.sListName
|
|
||||||
Next
|
|
||||||
SetBTLFileName(sBTLFileName)
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'Sub New(nProjectType As ProjectType, ProjectFileName As String)
|
||||||
|
' m_nProjectType = nProjectType
|
||||||
|
' If m_nProjectType = ProjectType.PROJ Then
|
||||||
|
' Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||||
|
' If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||||
|
' Integer.TryParse(DataFromFileName(0), m_nProjId)
|
||||||
|
' End If
|
||||||
|
' If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||||
|
' Integer.TryParse(DataFromFileName(1), m_nProdId)
|
||||||
|
' Else
|
||||||
|
' m_nProdId = 0
|
||||||
|
' End If
|
||||||
|
' If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||||
|
' m_BTLFileName = DataFromFileName(2)
|
||||||
|
' End If
|
||||||
|
' ElseIf m_nProjectType = ProjectType.PROD Then
|
||||||
|
' Integer.TryParse(ProjectFileName, m_nProdId)
|
||||||
|
' End If
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
|
||||||
|
' MyBase.New(nProjectType, nProjId, nProdId, sBTLFileName)
|
||||||
|
'End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
#End Region ' CONSTRUCTORS
|
||||||
|
|
||||||
|
' funzione che restituisce le parti di nome file
|
||||||
|
Friend Shared Function VerifyProjectFile(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
|
||||||
|
If nProjectType = ProjectType.PROJ Then
|
||||||
|
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||||
|
If DataFromFileName.Count = 3 Then
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(0), nProjId)
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(1), nProdId)
|
||||||
|
Else
|
||||||
|
nProdId = 0
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||||
|
sBTLFileName = DataFromFileName(2)
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
ElseIf nProjectType = ProjectType.PROD Then
|
||||||
|
Return Integer.TryParse(ProjectFileName, nProdId)
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' funzione che dato un nome file e il tipo restituisce il corretto numero di progetto
|
||||||
|
Friend Shared Function GetProjectNumber(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
|
||||||
|
If String.IsNullOrWhiteSpace(ProjectFileName) Then
|
||||||
|
nProjId = 0
|
||||||
|
nProdId = 0
|
||||||
|
sBTLFileName = ""
|
||||||
|
Return False
|
||||||
|
ElseIf ProjectFileName.Contains(FILENAMESEPARATOR) Then
|
||||||
|
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||||
|
If DataFromFileName.Count = 3 Then
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(0), nProjId)
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(1), nProdId)
|
||||||
|
Else
|
||||||
|
nProdId = 0
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||||
|
sBTLFileName = DataFromFileName(2)
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
ElseIf nProjectType = ProjectType.PROJ Then
|
||||||
|
Dim ProjectFileNameProd As String = Integer.TryParse(ProjectFileName, nProdId)
|
||||||
|
Dim nTempProjId As Integer = 0
|
||||||
|
Dim nTempProdId As Integer = 0
|
||||||
|
Dim sTempBTLFileName As String = ""
|
||||||
|
' ricavo lista cartelle proj
|
||||||
|
Dim AllDirsInDir As IEnumerable(Of String) = IO.Directory.EnumerateDirectories(Map.refMainWindowVM.MainWindowM.sProjsDir)
|
||||||
|
For Each Directory In AllDirsInDir
|
||||||
|
Dim AllFilesInDir As IEnumerable(Of String) = IO.Directory.EnumerateFiles(Directory)
|
||||||
|
For Each File In AllFilesInDir
|
||||||
|
If Path.GetExtension(File).ToLower() = ".nge" Then
|
||||||
|
If File.Contains(FILENAMESEPARATOR) Then
|
||||||
|
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||||
|
If DataFromFileName.Count = 3 Then
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(0), nTempProjId)
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(1), nTempProdId)
|
||||||
|
Else
|
||||||
|
nProdId = 0
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||||
|
sTempBTLFileName = DataFromFileName(2)
|
||||||
|
End If
|
||||||
|
If ProjectFileNameProd = nTempProdId Then
|
||||||
|
nProjId = nTempProjId
|
||||||
|
nProdId = nTempProdId
|
||||||
|
sTempBTLFileName = sBTLFileName
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -7,132 +7,137 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class SupervisorManagerVM
|
Public Class SupervisorManagerVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "Private Fields"
|
||||||
|
|
||||||
Private m_CurrProd As ProdFileVM
|
' Definizione comandi
|
||||||
Friend Property CurrProd As ProdFileVM
|
Private m_cmdOpen As ICommand
|
||||||
Get
|
|
||||||
Return m_CurrProd
|
|
||||||
End Get
|
|
||||||
Set(value As ProdFileVM)
|
|
||||||
m_CurrProd = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
' Definizione comandi
|
Private m_CurrProd As ProdFileVM
|
||||||
Private m_cmdOpen As ICommand
|
|
||||||
'Private m_cmdSave As ICommand
|
|
||||||
'Private m_cmdGoToProj As ICommand
|
|
||||||
|
|
||||||
'#Region "ToolTip"
|
#End Region
|
||||||
|
|
||||||
' 'Proprietà ToolTip
|
#Region "Public Constructors"
|
||||||
' Public ReadOnly Property OpenToolTip As String
|
|
||||||
' Get
|
|
||||||
' Return EgtMsg(MSG_TOPCOMMANDBAR + 2)
|
|
||||||
' End Get
|
|
||||||
' End Property
|
|
||||||
' Public ReadOnly Property SaveToolTip As String
|
|
||||||
' Get
|
|
||||||
' Return EgtMsg(MSG_TOPCOMMANDBAR + 3)
|
|
||||||
' End Get
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
'#End Region ' ToolTip
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefSupervisorManagerVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Fields & Properties
|
#End Region
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "Internal Properties"
|
||||||
|
|
||||||
Sub New()
|
Friend Property CurrProd As ProdFileVM
|
||||||
' Creo riferimento a questa classe in Map
|
Get
|
||||||
Map.SetRefSupervisorManagerVM(Me)
|
Return m_CurrProd
|
||||||
End Sub
|
End Get
|
||||||
|
Set(value As ProdFileVM)
|
||||||
|
m_CurrProd = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region
|
||||||
|
|
||||||
#Region "METHODS"
|
'Private m_cmdSave As ICommand
|
||||||
|
'Private m_cmdGoToProj As ICommand
|
||||||
|
|
||||||
Public Function SetCurrProd(nProdId As Integer) As Boolean
|
'#Region "ToolTip"
|
||||||
Dim Currprod As ProdModel = DbControllers.m_ProdController.FindByProdId(nProdId)
|
|
||||||
If IsNothing(Currprod) Then Return False
|
|
||||||
m_CurrProd = New ProdFileVM(ProdFileM.CreateProdFileM(Currprod.ProdId, New List(Of Integer), Date.Now(), ""))
|
|
||||||
Return True
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
' 'Proprietà ToolTip
|
||||||
|
' Public ReadOnly Property OpenToolTip As String
|
||||||
|
' Get
|
||||||
|
' Return EgtMsg(MSG_TOPCOMMANDBAR + 2)
|
||||||
|
' End Get
|
||||||
|
' End Property
|
||||||
|
' Public ReadOnly Property SaveToolTip As String
|
||||||
|
' Get
|
||||||
|
' Return EgtMsg(MSG_TOPCOMMANDBAR + 3)
|
||||||
|
' End Get
|
||||||
|
' End Property
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "Public Properties"
|
||||||
|
|
||||||
#Region "OpenCommand"
|
''' <summary>
|
||||||
|
''' Returns a command that do Open.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property OpenCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdOpen Is Nothing Then
|
||||||
|
m_cmdOpen = New Command(AddressOf Open)
|
||||||
|
End If
|
||||||
|
Return m_cmdOpen
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
#End Region
|
||||||
''' Returns a command that do Open.
|
|
||||||
''' </summary>
|
|
||||||
Public ReadOnly Property OpenCommand As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdOpen Is Nothing Then
|
|
||||||
m_cmdOpen = New Command(AddressOf Open)
|
|
||||||
End If
|
|
||||||
Return m_cmdOpen
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
''' <summary>
|
#Region "Internal Methods"
|
||||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
|
||||||
''' </summary>
|
|
||||||
Friend Sub Open()
|
|
||||||
OpenProject()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub OpenProject()
|
''' <summary>
|
||||||
'' verifico se progetto modificato, e chiedo se salvare
|
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||||
'ProdFileVM.VerifyProjectModification(CurrProd)
|
''' </summary>
|
||||||
Dim sFilePath As String = ""
|
Friend Sub Open()
|
||||||
' se la string è vuota
|
OpenProject()
|
||||||
Dim TempCurrProd As ProdFileVM
|
End Sub
|
||||||
Dim OpenProjectFileDialogVM As OpenProjectFileDialogVM = Nothing
|
|
||||||
' apro dialogo di scelta file
|
Friend Sub OpenProject()
|
||||||
OpenProjectFileDialogVM = New OpenProjectFileDialogVM
|
'' verifico se progetto modificato, e chiedo se salvare
|
||||||
Dim OpenFile As New OpenProjectFileDialogV(Application.Current.MainWindow, OpenProjectFileDialogVM)
|
'ProdFileVM.VerifyProjectModification(CurrProd)
|
||||||
Dim DialogResult As Boolean? = OpenFile.EgtShowDialog(ProjectType.PROD)
|
Dim sFilePath As String = ""
|
||||||
If IsNothing(DialogResult) OrElse Not DialogResult Then Return
|
' se la string è vuota
|
||||||
sFilePath = OpenProjectFileDialogVM.SelProject.sProdPath
|
Dim TempCurrProd As ProdFileVM
|
||||||
TempCurrProd = OpenProjectFileDialogVM.SelProject
|
Dim OpenProjectFileDialogVM As OpenProjectFileDialogVM = Nothing
|
||||||
If File.Exists(sFilePath) Then
|
' apro dialogo di scelta file
|
||||||
If Map.refSceneHostVM.MainController.OpenProject(sFilePath, False) Then
|
OpenProjectFileDialogVM = New OpenProjectFileDialogVM
|
||||||
m_CurrProd = TempCurrProd
|
Dim OpenFile As New OpenProjectFileDialogV(Application.Current.MainWindow, OpenProjectFileDialogVM)
|
||||||
Map.refMainWindowVM.UpdateTitle()
|
Dim DialogResult As Boolean? = OpenFile.EgtShowDialog(ProjectType.PROD)
|
||||||
'If Map.refMachGroupPanelVM.InitMachGroupList() Then
|
If IsNothing(DialogResult) OrElse Not DialogResult Then Return
|
||||||
' m_CurrProd = TempCurrProd
|
sFilePath = OpenProjectFileDialogVM.SelProject.sProdPath
|
||||||
' Map.refMainWindowVM.SetTitle(CurrProd.nProdId.ToString("0000") & " - EgtBEAMWALL")
|
TempCurrProd = OpenProjectFileDialogVM.SelProject
|
||||||
'Else
|
If File.Exists(sFilePath) Then
|
||||||
'MessageBox.Show("Impossibile aprire gruppi di lavorazione del file!!")
|
If Map.refSceneHostVM.MainController.OpenProject(sFilePath, False) Then
|
||||||
'Map.refSceneHostVM.MainController.NewProject()
|
m_CurrProd = TempCurrProd
|
||||||
'Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL")
|
Map.refMainWindowVM.UpdateTitle()
|
||||||
'End If
|
'If Map.refMachGroupPanelVM.InitMachGroupList() Then
|
||||||
Else
|
' m_CurrProd = TempCurrProd
|
||||||
MessageBox.Show("Impossibile aprire il file!!")
|
' Map.refMainWindowVM.SetTitle(CurrProd.nProdId.ToString("0000") & " - EgtBEAMWALL")
|
||||||
|
'Else
|
||||||
|
'MessageBox.Show("Impossibile aprire gruppi di lavorazione del file!!")
|
||||||
|
'Map.refSceneHostVM.MainController.NewProject()
|
||||||
|
'Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL")
|
||||||
|
'End If
|
||||||
|
Else
|
||||||
|
MessageBox.Show("Impossibile aprire il file!!")
|
||||||
|
Map.refSceneHostVM.MainController.NewProject()
|
||||||
|
Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
MessageBox.Show("File non trovato!!")
|
||||||
Map.refSceneHostVM.MainController.NewProject()
|
Map.refSceneHostVM.MainController.NewProject()
|
||||||
Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL")
|
Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL")
|
||||||
End If
|
End If
|
||||||
Else
|
Map.refProjectVM.SupervisorMachGroupPanelVM = New MyMachGroupPanelVM(MachGroupPanelM.CreateNewMachGroupPanel())
|
||||||
MessageBox.Show("File non trovato!!")
|
Dim TempList As List(Of DataLayer.DatabaseModels.MachGroupModel) = DbControllers.m_MachGroupController.GetByProdSupervisor(Map.refSupervisorManagerVM.CurrProd.nProdId, m_SupervisorId)
|
||||||
Map.refSceneHostVM.MainController.NewProject()
|
For Each MachGroup In TempList
|
||||||
Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL")
|
Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.Add(Map.refProjectVM.ProdMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = MachGroup.MachGroupId))
|
||||||
End If
|
Next
|
||||||
Map.refProjectVM.SupervisorMachGroupPanelVM = New MyMachGroupPanelVM(MachGroupPanelM.CreateNewMachGroupPanel())
|
Map.refProjectVM.SupervisorMachGroupPanelVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList))
|
||||||
Dim TempList As List(Of DataLayer.DatabaseModels.MachGroupModel) = DbControllers.m_MachGroupController.GetByProdSupervisor(Map.refSupervisorManagerVM.CurrProd.nProdId, m_SupervisorId)
|
End Sub
|
||||||
For Each MachGroup In TempList
|
|
||||||
Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.Add(Map.refProjectVM.ProdMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = MachGroup.MachGroupId))
|
|
||||||
Next
|
|
||||||
Map.refProjectVM.SupervisorMachGroupPanelVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' OpenCommand
|
#End Region
|
||||||
|
|
||||||
#End Region ' Commands
|
#Region "Public Methods"
|
||||||
|
|
||||||
|
'#End Region ' ToolTip
|
||||||
|
Public Function SetCurrProd(nProdId As Integer) As Boolean
|
||||||
|
Dim Currprod As ProdFileM = DbControllers.m_ProdController.FindCoreByProdId(nProdId)
|
||||||
|
If IsNothing(Currprod) Then Return False
|
||||||
|
m_CurrProd = New ProdFileVM(Currprod)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -4,7 +4,6 @@ Module DbControllers
|
|||||||
|
|
||||||
Friend m_SupervisorId As String = "1"
|
Friend m_SupervisorId As String = "1"
|
||||||
|
|
||||||
Public m_ProjController As DataLayer.Controllers.ProjController
|
|
||||||
Public m_ProdController As DataLayer.Controllers.ProdController
|
Public m_ProdController As DataLayer.Controllers.ProdController
|
||||||
Public m_MachGroupController As DataLayer.Controllers.MachGroupController
|
Public m_MachGroupController As DataLayer.Controllers.MachGroupController
|
||||||
Public m_PartController As DataLayer.Controllers.PartController
|
Public m_PartController As DataLayer.Controllers.PartController
|
||||||
@@ -26,7 +25,6 @@ Module DbControllers
|
|||||||
DataLayer.DbConfig.InitDb("127.0.0.1", sUser, sPwd)
|
DataLayer.DbConfig.InitDb("127.0.0.1", sUser, sPwd)
|
||||||
DataLayer.DbConfig.CheckUser(sUser, sPwd)
|
DataLayer.DbConfig.CheckUser(sUser, sPwd)
|
||||||
|
|
||||||
m_ProjController = New DataLayer.Controllers.ProjController
|
|
||||||
m_ProdController = New DataLayer.Controllers.ProdController
|
m_ProdController = New DataLayer.Controllers.ProdController
|
||||||
m_MachGroupController = New DataLayer.Controllers.MachGroupController
|
m_MachGroupController = New DataLayer.Controllers.MachGroupController
|
||||||
m_PartController = New DataLayer.Controllers.PartController
|
m_PartController = New DataLayer.Controllers.PartController
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
Public Class ViewerOptimizerComm
|
|
||||||
|
|
||||||
Sub New()
|
|
||||||
' imposto in Map
|
|
||||||
'Map.SetRefMachManaging(Me)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub Timer_Tick()
|
|
||||||
' se c'e' un progetto aperto
|
|
||||||
If IsNothing(Map.refSupervisorManagerVM.CurrProd) Then Return
|
|
||||||
' verifico se e' aperto in qualche ottimizzatore
|
|
||||||
'DbControllers.m_ProdController.
|
|
||||||
'Map.refSupervisorManagerVM.CurrProd.bIsLocked
|
|
||||||
' verifico se la mappa messaggi ha indice maggiore del mio
|
|
||||||
|
|
||||||
' ricarico il progetto
|
|
||||||
|
|
||||||
' aggiorno eventuali nuovi machgroup
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' se devo ripartire a meta' di una barra
|
|
||||||
|
|
||||||
' mando messaggio di blocco dell'ottimizzatore
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
Public Class ViewerOptimizerCommThread
|
|
||||||
|
|
||||||
' variabile che ferma il ciclo
|
|
||||||
Private Shared m_Stop As Boolean = False
|
|
||||||
|
|
||||||
Friend Shared Sub StopThread()
|
|
||||||
m_Stop = True
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Shared Sub ViewerOptimizerCommThreadFunction()
|
|
||||||
|
|
||||||
' creo classe di comunicazione
|
|
||||||
Dim m_ViewerOptimizerComm As ViewerOptimizerComm = New ViewerOptimizerComm()
|
|
||||||
|
|
||||||
While Not m_Stop
|
|
||||||
' eseguo ciclo principale che tiene vivo il thread
|
|
||||||
m_ViewerOptimizerComm.Timer_Tick()
|
|
||||||
Threading.Thread.Sleep(TimeSpan.FromMilliseconds(1000))
|
|
||||||
End While
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,37 +1,40 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
<section name="entityFramework"
|
<section name="entityFramework"
|
||||||
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||||
requirePermission="false"/>
|
requirePermission="false" />
|
||||||
</configSections>
|
</configSections>
|
||||||
<entityFramework>
|
<entityFramework>
|
||||||
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6"/>
|
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
|
||||||
<providers>
|
<providers>
|
||||||
<provider invariantName="MySql.Data.MySqlClient"
|
<provider invariantName="MySql.Data.MySqlClient"
|
||||||
type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
|
type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
|
||||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
|
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||||
</providers>
|
</providers>
|
||||||
</entityFramework>
|
</entityFramework>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="DefaultConnection"
|
<add name="DefaultConnection"
|
||||||
connectionString="server=localhost;port=3306;User Id=EgtUser;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none"
|
connectionString="server=localhost;port=3306;User Id=EgtUser;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none"
|
||||||
providerName="MySql.Data.MySqlClient"/>
|
providerName="MySql.Data.MySqlClient" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral"/>
|
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0"/>
|
<bindingRedirect oldVersion="0.0.0.0-6.10.9.0" newVersion="6.10.9.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<system.data>
|
<system.data>
|
||||||
<DbProviderFactories>
|
<DbProviderFactories>
|
||||||
<remove invariant="MySql.Data.MySqlClient"/>
|
<remove invariant="MySql.Data.MySqlClient" />
|
||||||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL"
|
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL"
|
||||||
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
|
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
||||||
</DbProviderFactories>
|
</DbProviderFactories>
|
||||||
</system.data>
|
</system.data>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
@@ -6,7 +6,21 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class BTLFeatureVM
|
Public Class BTLFeatureVM
|
||||||
Inherits Core.BTLFeatureVM
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private WithEvents m_BTLFeatureM As BTLFeatureM
|
||||||
|
Public ReadOnly Property BTLFeatureM As BTLFeatureM
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private m_BTLPartM As BTLPartM
|
||||||
|
|
||||||
|
Public ReadOnly Property nFeatureId As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nFeatureId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property GRPList As ObservableCollection(Of Integer)
|
Public Property GRPList As ObservableCollection(Of Integer)
|
||||||
Get
|
Get
|
||||||
@@ -17,7 +31,7 @@ Public Class BTLFeatureVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Overrides Property nSelGRP As Integer
|
Public Property nSelGRP As Integer
|
||||||
Get
|
Get
|
||||||
Return m_BTLFeatureM.nSelGRP
|
Return m_BTLFeatureM.nSelGRP
|
||||||
End Get
|
End Get
|
||||||
@@ -44,6 +58,27 @@ Public Class BTLFeatureVM
|
|||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Friend ReadOnly Property sDescGRP As String
|
||||||
|
Get
|
||||||
|
Dim sDescConstruction As String = String.Empty
|
||||||
|
If CalcBeamPrivateProfileGRP(m_BTLFeatureM.nSelGRP) = 0 Then
|
||||||
|
sDescConstruction = "L"
|
||||||
|
Else
|
||||||
|
sDescConstruction = "T"
|
||||||
|
End If
|
||||||
|
sDescConstruction &= m_BTLFeatureM.nPRC.ToString("000")
|
||||||
|
Return sDescConstruction
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nPRC As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nPRC
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_BTLFeatureM.nPRC = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property SIDEList As ObservableCollection(Of Integer)
|
Public Property SIDEList As ObservableCollection(Of Integer)
|
||||||
Get
|
Get
|
||||||
@@ -55,7 +90,7 @@ Public Class BTLFeatureVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
' Lato
|
' Lato
|
||||||
Public Overrides Property nSelSIDE As Integer
|
Public Property nSelSIDE As Integer
|
||||||
Get
|
Get
|
||||||
Return m_BTLFeatureM.nSelSIDE
|
Return m_BTLFeatureM.nSelSIDE
|
||||||
End Get
|
End Get
|
||||||
@@ -81,7 +116,13 @@ Public Class BTLFeatureVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Overrides Property bDO As Boolean
|
Public ReadOnly Property sName As String
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property bDO As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_BTLFeatureM.bDO
|
Return m_BTLFeatureM.bDO
|
||||||
End Get
|
End Get
|
||||||
@@ -98,12 +139,128 @@ Public Class BTLFeatureVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property nPRID As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nPRID
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_BTLFeatureM.nPRID = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sDES As String
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.sDES
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_BTLFeatureM.sDES = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property frFRAME As Frame3d
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.frFRAME
|
||||||
|
End Get
|
||||||
|
Set(value As Frame3d)
|
||||||
|
m_BTLFeatureM.frFRAME = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' proprieta' che mostra la descrizione in interfaccia
|
||||||
|
Public ReadOnly Property sDesc As String
|
||||||
|
Get
|
||||||
|
Return sDescGRP & " " & sName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property sDrawPath As String
|
Public ReadOnly Property sDrawPath As String
|
||||||
Get
|
Get
|
||||||
Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png"
|
Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescGRP & ".png"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nState As CalcStates
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nCALC_ERR As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nCALC_ERR
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nCALC_ROT As Integer
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.nCALC_ROT
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sCALC_MSG As String
|
||||||
|
Get
|
||||||
|
Return m_BTLFeatureM.sCALC_MSG
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||||
|
Get
|
||||||
|
If Not m_BTLFeatureM.bDO Then
|
||||||
|
Return Brushes.Aqua
|
||||||
|
ElseIf m_BTLFeatureM.nState = CalcStates.OK Then
|
||||||
|
Return Brushes.Green
|
||||||
|
ElseIf m_BTLFeatureM.nState = CalcStates.NOTCALCULATED Then
|
||||||
|
Return Brushes.LightGray
|
||||||
|
ElseIf m_BTLFeatureM.nState = CalcStates.INFO Then
|
||||||
|
Return Brushes.Green
|
||||||
|
ElseIf m_BTLFeatureM.nState = CalcStates.WARNING Then
|
||||||
|
Return Brushes.Orange
|
||||||
|
ElseIf m_BTLFeatureM.nState = CalcStates.ERROR_ Then
|
||||||
|
Return Brushes.Red
|
||||||
|
Else
|
||||||
|
Return Brushes.Red
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(m_BTLFeatureM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ERR_Letter As String
|
||||||
|
Get
|
||||||
|
Select Case m_BTLFeatureM.nCALC_ERR
|
||||||
|
Case 22
|
||||||
|
Return "c"
|
||||||
|
Case 19, 23, 24, 25
|
||||||
|
Return "e"
|
||||||
|
Case 17
|
||||||
|
Return "w"
|
||||||
|
Case < 0
|
||||||
|
Return "i"
|
||||||
|
Case Else
|
||||||
|
Return ""
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Select Case m_BTLFeatureM.nState
|
||||||
|
Case CalcStates.ERROR_
|
||||||
|
Return Brushes.Red
|
||||||
|
Case CalcStates.WARNING
|
||||||
|
Return Brushes.Orange
|
||||||
|
Case CalcStates.INFO
|
||||||
|
Return Brushes.Green
|
||||||
|
Case Else
|
||||||
|
Return Brushes.Red
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_PBTLParamVMList As ObservableCollection(Of BTLParamVM)
|
Private m_PBTLParamVMList As ObservableCollection(Of BTLParamVM)
|
||||||
Public Property PBTLParamVMList As ObservableCollection(Of BTLParamVM)
|
Public Property PBTLParamVMList As ObservableCollection(Of BTLParamVM)
|
||||||
Get
|
Get
|
||||||
@@ -177,6 +334,41 @@ Public Class BTLFeatureVM
|
|||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
'Sub New(ParentPart As BTLPartVM, nFeatureId As Integer)
|
||||||
|
' MyBase.New(ParentPart, nFeatureId)
|
||||||
|
' ' leggo gruppo, numero feature e lato
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_GRP, m_nSelGRP)
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_PRC, m_nPRC)
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_SIDE, m_nSelSIDE)
|
||||||
|
' Dim nDO As Integer = 1
|
||||||
|
' If EgtGetInfo(nFeatureId, BTL_FTR_DO, nDO) Then
|
||||||
|
' m_bDO = (nDO <> 0)
|
||||||
|
' Else
|
||||||
|
' m_bDO = True
|
||||||
|
' End If
|
||||||
|
' ' leggo des,prid e frame
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_DES, m_sDES)
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_PRID, m_nPRID)
|
||||||
|
' EgtGetInfo(nFeatureId, BTL_FTR_FRAME, m_frFRAME)
|
||||||
|
' ' leggo calc error
|
||||||
|
' Dim nErr As Integer = 0
|
||||||
|
' Dim nRot As Integer = 0
|
||||||
|
' Dim nFall As Integer = 0
|
||||||
|
' Dim sMsg As String = ""
|
||||||
|
' Dim bCalc As Boolean = False
|
||||||
|
' bCalc = EgtGetInfo(m_nFeatureId, ITG_PROJ_ERR, nErr)
|
||||||
|
' EgtGetInfo(m_nFeatureId, ITG_PROJ_ROT, nRot)
|
||||||
|
' EgtGetInfo(m_nFeatureId, ITG_PROJ_FALL, nFall)
|
||||||
|
' EgtGetInfo(m_nFeatureId, ITG_PROJ_MSG, sMsg)
|
||||||
|
' CalcFeatureUpdate(bCalc, nErr, nRot, nFall, sMsg)
|
||||||
|
' ' leggo parametri della feature
|
||||||
|
' GetBeamPrivateProfileGRPList(CalcBeamPrivateProfileGRP(nSelGRP), m_nPRC, m_GRPList)
|
||||||
|
' GetBeamPrivateProfileName(m_nSelGRP, m_nPRC, Me)
|
||||||
|
' ' crea parametri per questa feature da file ini
|
||||||
|
' CreateFeatureParams()
|
||||||
|
' ReadFeatureParams()
|
||||||
|
'End Sub
|
||||||
|
|
||||||
Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
|
Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
|
||||||
m_BTLFeatureM = BTLFeatureM
|
m_BTLFeatureM = BTLFeatureM
|
||||||
AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
|
AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
|
||||||
@@ -192,7 +384,11 @@ Public Class BTLFeatureVM
|
|||||||
|
|
||||||
Sub New(BTLFeatureM As BTLFeatureM)
|
Sub New(BTLFeatureM As BTLFeatureM)
|
||||||
m_BTLFeatureM = BTLFeatureM
|
m_BTLFeatureM = BTLFeatureM
|
||||||
|
'AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
|
||||||
|
'AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded
|
||||||
m_BTLPartM = Nothing
|
m_BTLPartM = Nothing
|
||||||
|
'CreatePBTLParamVMList()
|
||||||
|
'CreateQBTLParamVMList()
|
||||||
NotifyPropertyChanged(NameOf(Calc_Background))
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||||
@@ -264,6 +460,34 @@ Public Class BTLFeatureVM
|
|||||||
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' funzione che seleziona la feature nella geometria
|
||||||
|
Friend Sub SelGeomFeature()
|
||||||
|
EgtDeselectAll()
|
||||||
|
SelGeomFeature(nFeatureId)
|
||||||
|
End Sub
|
||||||
|
Private Sub SelGeomFeature(nMyFeatureId As Integer)
|
||||||
|
EgtSelectObj(nMyFeatureId)
|
||||||
|
Dim sVal As String = ""
|
||||||
|
If EgtGetInfo(nMyFeatureId, BTL_FTR_ADJID, sVal) Then
|
||||||
|
Dim vAdjId() As String = sVal.Split(","c)
|
||||||
|
For Each sAdjId In vAdjId
|
||||||
|
Dim nAdjId As Integer
|
||||||
|
If Integer.TryParse(sAdjId, nAdjId) Then
|
||||||
|
SelGeomFeature(nMyFeatureId + nAdjId)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If EgtGetInfo(nMyFeatureId, BTL_FTR_AUXID, sVal) Then
|
||||||
|
Dim vAuxId() As String = sVal.Split(","c)
|
||||||
|
For Each sAuxId In vAuxId
|
||||||
|
Dim nAuxId As Integer
|
||||||
|
If Integer.TryParse(sAuxId, nAuxId) Then
|
||||||
|
EgtSelectObj(nMyFeatureId + nAuxId)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Function Copy() As BTLFeatureM
|
Public Function Copy() As BTLFeatureM
|
||||||
Return Copy( m_BTLPartM)
|
Return Copy( m_BTLPartM)
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -1750,12 +1750,6 @@ Public Class BTLPartVM
|
|||||||
Return Qty = Added
|
Return Qty = Added
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' funzione che dato l'Id di un Part(Duplo) restituisce il BTLPart di origine
|
|
||||||
Friend Shared Function RetrieveBTLPartFromPart(nPartId As Integer) As BTLPartVM
|
|
||||||
Dim BTLPartId As Integer = EgtDuploGetOriginal(nPartId)
|
|
||||||
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = BTLPartId)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|||||||
@@ -491,44 +491,44 @@ Public Class BTLStructureVM
|
|||||||
|
|
||||||
Public ReadOnly Property sBTLTotParts As String
|
Public ReadOnly Property sBTLTotParts As String
|
||||||
Get
|
Get
|
||||||
Return m_BTLPartVMList.Sum(Function(x) x.nCNT + x.nADDED)
|
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nCNT + x.nADDED)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property sBTLTotVolume As String
|
Public ReadOnly Property sBTLTotVolume As String
|
||||||
Get
|
Get
|
||||||
Dim dMMTotVolume As Double = m_BTLPartVMList.Sum(Function(x) x.dUnitVolume * (x.nCNT + x.nADDED))
|
Dim dMMTotVolume As Double = Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.dUnitVolume * (x.nCNT + x.nADDED))
|
||||||
Return If(EgtUiUnitsAreMM(), DoubleToString(dMMTotVolume / 1000000000, 3), DoubleToString(dMMTotVolume * (12 / ONEINCH), 3))
|
Return If(EgtUiUnitsAreMM(), DoubleToString(dMMTotVolume / 1000000000, 3), DoubleToString(dMMTotVolume * (12 / ONEINCH), 3))
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property sBTLTotTime As String
|
Public ReadOnly Property sBTLTotTime As String
|
||||||
Get
|
Get
|
||||||
Return TimeSpan.FromSeconds(m_BTLPartVMList.Sum(Function(x) x.nCALC_TIME * (x.nCNT + x.nADDED))).ToString()
|
Return TimeSpan.FromSeconds(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nCALC_TIME * (x.nCNT + x.nADDED))).ToString()
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property sTotCNTParts As String
|
Public ReadOnly Property sTotCNTParts As String
|
||||||
Get
|
Get
|
||||||
Return m_BTLPartVMList.Sum(Function(x) x.nCNT)
|
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nCNT)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property sTotADDEDParts As String
|
Public ReadOnly Property sTotADDEDParts As String
|
||||||
Get
|
Get
|
||||||
Return m_BTLPartVMList.Sum(Function(x) x.nADDED)
|
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nADDED)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property sTotINPRODParts As String
|
Public ReadOnly Property sTotINPRODParts As String
|
||||||
Get
|
Get
|
||||||
Return m_BTLPartVMList.Sum(Function(x) x.nINPROD)
|
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nINPROD)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property sTotDONEParts As String
|
Public ReadOnly Property sTotDONEParts As String
|
||||||
Get
|
Get
|
||||||
Return m_BTLPartVMList.Sum(Function(x) x.nDONE)
|
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.Sum(Function(x) x.nDONE)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,10 @@
|
|||||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"
|
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"
|
||||||
CanUserAddRows="False"
|
CanUserAddRows="False"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
|
CanUserSortColumns="True"
|
||||||
|
CanUserResizeColumns="True"
|
||||||
CanUserResizeRows="False"
|
CanUserResizeRows="False"
|
||||||
|
CanUserReorderColumns="True"
|
||||||
SelectionMode="Single"
|
SelectionMode="Single"
|
||||||
ScrollViewer.CanContentScroll="True"
|
ScrollViewer.CanContentScroll="True"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
@@ -18,13 +21,14 @@
|
|||||||
BindingColumns="{Binding FeatureColumns}">
|
BindingColumns="{Binding FeatureColumns}">
|
||||||
<DataGrid.Resources>
|
<DataGrid.Resources>
|
||||||
<!--DO - Abilitazione-->
|
<!--DO - Abilitazione-->
|
||||||
<DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO, UpdateSourceTrigger=PropertyChanged}">
|
<DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Width="Auto">
|
||||||
<DataGridCheckBoxColumn.Header>
|
<DataGridCheckBoxColumn.Header>
|
||||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"/>
|
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"/>
|
||||||
</DataGridCheckBoxColumn.Header>
|
</DataGridCheckBoxColumn.Header>
|
||||||
</DataGridCheckBoxColumn>
|
</DataGridCheckBoxColumn>
|
||||||
<!--Validità feature-->
|
<!--Validità feature-->
|
||||||
<DataGridTemplateColumn x:Key="colCALC">
|
<DataGridTemplateColumn x:Key="colCALC" Width="Auto">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -69,7 +73,9 @@
|
|||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<!--Descrizione-->
|
<!--Descrizione-->
|
||||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}">
|
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.Description_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.Description_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class FeatureListVM
|
Public Class FeatureListVM
|
||||||
|
|
||||||
Private m_FeatureColumns As New ObservableCollection(Of EgtDataGridColumn)
|
Private m_FeatureColumns As New ObservableCollection(Of String)
|
||||||
Public Property FeatureColumns As ObservableCollection(Of EgtDataGridColumn)
|
Public Property FeatureColumns As ObservableCollection(Of String)
|
||||||
Get
|
Get
|
||||||
Return m_FeatureColumns
|
Return m_FeatureColumns
|
||||||
End Get
|
End Get
|
||||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
Set(value As ObservableCollection(Of String))
|
||||||
m_FeatureColumns = value
|
m_FeatureColumns = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -27,8 +26,10 @@ Public Class FeatureListVM
|
|||||||
Sub New()
|
Sub New()
|
||||||
' creo riferimento in Map
|
' creo riferimento in Map
|
||||||
Map.SetRefFeatureListVM(Me)
|
Map.SetRefFeatureListVM(Me)
|
||||||
' carico le colonne della datagrid
|
' aggiungo le colonne alla tabella
|
||||||
GetPrivateProfileColumns(S_FEATURELIST, FeatureColumns)
|
FeatureColumns.Add("colDO")
|
||||||
|
FeatureColumns.Add("colCALC")
|
||||||
|
FeatureColumns.Add("colDESC")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -10,7 +10,10 @@
|
|||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
CanUserAddRows="False"
|
CanUserAddRows="False"
|
||||||
CanUserDeleteRows="False"
|
CanUserDeleteRows="False"
|
||||||
|
CanUserSortColumns="False"
|
||||||
|
CanUserResizeColumns="False"
|
||||||
CanUserResizeRows="False"
|
CanUserResizeRows="False"
|
||||||
|
CanUserReorderColumns="False"
|
||||||
SelectionMode="Single"
|
SelectionMode="Single"
|
||||||
ScrollViewer.CanContentScroll="True"
|
ScrollViewer.CanContentScroll="True"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
@@ -28,13 +31,14 @@
|
|||||||
</DataGrid.RowStyle>
|
</DataGrid.RowStyle>
|
||||||
<DataGrid.Resources>
|
<DataGrid.Resources>
|
||||||
<!--PDN - Nome-->
|
<!--PDN - Nome-->
|
||||||
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}">
|
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--Validità pezzo-->
|
<!--Validità pezzo-->
|
||||||
<DataGridTemplateColumn x:Key="colCALC">
|
<DataGridTemplateColumn x:Key="colCALC" Width="Auto">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -77,31 +81,40 @@
|
|||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<!--NAM - Descrizione-->
|
<!--NAM - Descrizione-->
|
||||||
<DataGridTextColumn x:Key="colNAM" Binding="{Binding sNAM}">
|
<DataGridTextColumn x:Key="colNAM" Binding="{Binding sNAM}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--W - Larghezza-->
|
<!--W - Larghezza-->
|
||||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}">
|
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}"
|
||||||
|
Width="65"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--H - Altezza-->
|
<!--H - Altezza-->
|
||||||
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}">
|
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}"
|
||||||
|
Width="65"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--L - Lunghezza-->
|
<!--L - Lunghezza-->
|
||||||
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}">
|
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}"
|
||||||
|
Width="65"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--ROT - Rotazione-->
|
<!--ROT - Rotazione-->
|
||||||
<DataGridTemplateColumn x:Key="colROT">
|
<DataGridTemplateColumn x:Key="colROT" Width="65"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTemplateColumn.Header>
|
<DataGridTemplateColumn.Header>
|
||||||
<TextBlock Text="Rotazione"/>
|
<TextBlock Text="Rotazione"/>
|
||||||
</DataGridTemplateColumn.Header>
|
</DataGridTemplateColumn.Header>
|
||||||
@@ -136,7 +149,8 @@
|
|||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<!--INV - Inversione-->
|
<!--INV - Inversione-->
|
||||||
<DataGridTemplateColumn x:Key="colFLIP">
|
<DataGridTemplateColumn x:Key="colFLIP" Width="65"
|
||||||
|
IsReadOnly="False">
|
||||||
<DataGridTemplateColumn.Header>
|
<DataGridTemplateColumn.Header>
|
||||||
<TextBlock Text="Inversione"/>
|
<TextBlock Text="Inversione"/>
|
||||||
</DataGridTemplateColumn.Header>
|
</DataGridTemplateColumn.Header>
|
||||||
@@ -149,7 +163,9 @@
|
|||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<!--PosX - Posizione-->
|
<!--PosX - Posizione-->
|
||||||
<DataGridTextColumn x:Key="colPOSX" Binding="{Binding sPOSX, UpdateSourceTrigger=PropertyChanged}">
|
<DataGridTextColumn x:Key="colPOSX" Binding="{Binding sPOSX, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="False">
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.PosX_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.PosX_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||||
@@ -157,7 +173,9 @@
|
|||||||
</DataGridTextColumn.HeaderTemplate>
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--PosY - Posizione-->
|
<!--PosY - Posizione-->
|
||||||
<DataGridTextColumn x:Key="colPOSY" Binding="{Binding sPOSY, UpdateSourceTrigger=PropertyChanged}">
|
<DataGridTextColumn x:Key="colPOSY" Binding="{Binding sPOSY, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="False">
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.PosY_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.PosY_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||||
@@ -165,7 +183,8 @@
|
|||||||
</DataGridTextColumn.HeaderTemplate>
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--Off - Offset-->
|
<!--Off - Offset-->
|
||||||
<DataGridTextColumn x:Key="colOFFSET" Binding="{Binding sOffset}">
|
<DataGridTextColumn x:Key="colOFFSET" Binding="{Binding sOffset}"
|
||||||
|
Width="Auto">
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.Offset_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.Offset_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||||
@@ -173,7 +192,9 @@
|
|||||||
</DataGridTextColumn.HeaderTemplate>
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--MAT - Materiale-->
|
<!--MAT - Materiale-->
|
||||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartInRawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ Public Class PartInRawPartListV
|
|||||||
Private Sub PartInRawPartList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
Private Sub PartInRawPartList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||||
If TypeOf sender Is DataGridRow Then
|
If TypeOf sender Is DataGridRow Then
|
||||||
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
||||||
If Not IsNothing(Row) Then
|
If Not IsNothing(Row) AndAlso Row.IsSelected Then
|
||||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||||
Dim BeamMachGroup As Core.BeamMachGroupVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup
|
Dim BeamMachGroup As BeamMachGroupVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup
|
||||||
If EgtGetCurrMachGroup() = GDB_ID.NULL Then Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = BeamMachGroup
|
If EgtGetCurrMachGroup() = GDB_ID.NULL Then Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = BeamMachGroup
|
||||||
BeamMachGroup.SelPart = BeamMachGroup.SelPart
|
BeamMachGroup.SelPart = BeamMachGroup.SelPart
|
||||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ Imports EgtUILib
|
|||||||
|
|
||||||
Public Class PartInRawPartListVM
|
Public Class PartInRawPartListVM
|
||||||
|
|
||||||
Private m_PartInRawPartColumns As New ObservableCollection(Of EgtDataGridColumn)
|
Private m_PartInRawPartColumns As New ObservableCollection(Of String)
|
||||||
Public Property PartInRawPartColumns As ObservableCollection(Of EgtDataGridColumn)
|
Public Property PartInRawPartColumns As ObservableCollection(Of String)
|
||||||
Get
|
Get
|
||||||
Return m_PartInRawPartColumns
|
Return m_PartInRawPartColumns
|
||||||
End Get
|
End Get
|
||||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
Set(value As ObservableCollection(Of String))
|
||||||
m_PartInRawPartColumns = value
|
m_PartInRawPartColumns = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -74,19 +74,36 @@ Public Class PartInRawPartListVM
|
|||||||
Sub New()
|
Sub New()
|
||||||
' aggiungo riferimento a map
|
' aggiungo riferimento a map
|
||||||
Map.SetRefPartInRawPartListVM(Me)
|
Map.SetRefPartInRawPartListVM(Me)
|
||||||
' carico le colonne della datagrid
|
' aggiungo colonne
|
||||||
GetPrivateProfileColumns(S_PARTINRAWPARTLIST_BEAM, PartInRawPartColumns)
|
PartInRawPartColumns.Add(COL_PDN)
|
||||||
|
PartInRawPartColumns.Add(COL_CALC)
|
||||||
|
PartInRawPartColumns.Add(COL_NAM)
|
||||||
|
PartInRawPartColumns.Add(COL_W)
|
||||||
|
PartInRawPartColumns.Add(COL_H)
|
||||||
|
PartInRawPartColumns.Add(COL_L)
|
||||||
|
PartInRawPartColumns.Add(COL_ROT)
|
||||||
|
PartInRawPartColumns.Add(COL_FLIP)
|
||||||
|
PartInRawPartColumns.Add(COL_POSX)
|
||||||
|
PartInRawPartColumns.Add(COL_POSY)
|
||||||
|
PartInRawPartColumns.Add(COL_OFFSET)
|
||||||
|
PartInRawPartColumns.Add(COL_MATERIAL)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
Friend Sub UpdateColumns(nMachType As MachineType)
|
Friend Sub UpdateColumns(nMachType As MachineType)
|
||||||
If nMachType = MachineType.BEAM Then
|
If nMachType = MachineType.BEAM Then
|
||||||
PartInRawPartColumns.Clear()
|
If Not IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_ROT)) Then m_PartInRawPartColumns.Remove(COL_ROT)
|
||||||
GetPrivateProfileColumns(S_PARTINRAWPARTLIST_BEAM, PartInRawPartColumns)
|
If Not IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_FLIP)) Then m_PartInRawPartColumns.Remove(COL_FLIP)
|
||||||
|
If Not IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_POSX)) Then m_PartInRawPartColumns.Remove(COL_POSX)
|
||||||
|
If Not IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_POSY)) Then m_PartInRawPartColumns.Remove(COL_POSY)
|
||||||
|
If IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_OFFSET)) Then m_PartInRawPartColumns.Insert(6, COL_OFFSET)
|
||||||
ElseIf nMachType = MachineType.WALL Then
|
ElseIf nMachType = MachineType.WALL Then
|
||||||
PartInRawPartColumns.Clear()
|
If Not IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_OFFSET)) Then m_PartInRawPartColumns.Remove(COL_OFFSET)
|
||||||
GetPrivateProfileColumns(S_PARTINRAWPARTLIST_WALL, PartInRawPartColumns)
|
If IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_ROT)) Then m_PartInRawPartColumns.Insert(6, COL_ROT)
|
||||||
|
If IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_FLIP)) Then m_PartInRawPartColumns.Insert(7, COL_FLIP)
|
||||||
|
If IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_POSX)) Then m_PartInRawPartColumns.Insert(8, COL_POSX)
|
||||||
|
If IsNothing(m_PartInRawPartColumns.FirstOrDefault(Function(x) x = COL_POSY)) Then m_PartInRawPartColumns.Insert(9, COL_POSY)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,10 @@
|
|||||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"
|
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
CanUserDeleteRows="False"
|
CanUserDeleteRows="False"
|
||||||
|
CanUserSortColumns="True"
|
||||||
|
CanUserResizeColumns="True"
|
||||||
CanUserResizeRows="False"
|
CanUserResizeRows="False"
|
||||||
|
CanUserReorderColumns="true"
|
||||||
SelectionMode="Single"
|
SelectionMode="Single"
|
||||||
ScrollViewer.CanContentScroll="True"
|
ScrollViewer.CanContentScroll="True"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
@@ -18,13 +21,15 @@
|
|||||||
BindingColumns="{Binding RawPartColumns}">
|
BindingColumns="{Binding RawPartColumns}">
|
||||||
<DataGrid.Resources>
|
<DataGrid.Resources>
|
||||||
<!--ID - Id gruppo-->
|
<!--ID - Id gruppo-->
|
||||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding Name}">
|
<DataGridTextColumn x:Key="colNAME" Binding="{Binding Name}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.ID_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.ID_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--Validità pezzo-->
|
<!--Validità pezzo-->
|
||||||
<DataGridTemplateColumn x:Key="colCALC">
|
<DataGridTemplateColumn x:Key="colCALC" Width="Auto">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -67,7 +72,8 @@
|
|||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<!--STARTCUT - Ritaglio iniziale-->
|
<!--STARTCUT - Ritaglio iniziale-->
|
||||||
<DataGridTextColumn x:Key="colSTARTCUT" Binding="{Binding sStartCut}">
|
<DataGridTextColumn x:Key="colSTARTCUT" Binding="{Binding sStartCut}"
|
||||||
|
Width="65">
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.StartOffset_Msg,
|
<TextBlock Text="{Binding Path=DataContext.StartOffset_Msg,
|
||||||
@@ -76,42 +82,54 @@
|
|||||||
</DataGridTextColumn.HeaderTemplate>
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--W - Larghezza-->
|
<!--W - Larghezza-->
|
||||||
<DataGridTextColumn x:Key="colW" Binding="{Binding dW}">
|
<DataGridTextColumn x:Key="colW" Binding="{Binding dW}"
|
||||||
|
Width="65"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,
|
<TextBlock Text="{Binding Path=DataContext.W_Msg,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--H - Altezza-->
|
<!--H - Altezza-->
|
||||||
<DataGridTextColumn x:Key="colH" Binding="{Binding dH}">
|
<DataGridTextColumn x:Key="colH" Binding="{Binding dH}"
|
||||||
|
Width="65"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,
|
<TextBlock Text="{Binding Path=DataContext.H_Msg,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--L - Lunghezza-->
|
<!--L - Lunghezza-->
|
||||||
<DataGridTextColumn x:Key="colL" Binding="{Binding dL}">
|
<DataGridTextColumn x:Key="colL" Binding="{Binding dL}"
|
||||||
|
Width="65"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,
|
<TextBlock Text="{Binding Path=DataContext.L_Msg,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--MAT - Materiale-->
|
<!--MAT - Materiale-->
|
||||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.Material_Msg,
|
<TextBlock Text="{Binding Path=DataContext.Material_Msg,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--% - % utilizzo-->
|
<!--% - % utilizzo-->
|
||||||
<DataGridTextColumn x:Key="colUSAGE" Binding="{Binding sUsage}">
|
<DataGridTextColumn x:Key="colUSAGE" Binding="{Binding sUsage}"
|
||||||
|
Width="65"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.Used_Msg,
|
<TextBlock Text="{Binding Path=DataContext.Used_Msg,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!--S - Scarti-->
|
<!--S - Scarti-->
|
||||||
<DataGridTextColumn x:Key="colWASTE" Binding="{Binding sWaste}">
|
<DataGridTextColumn x:Key="colWASTE" Binding="{Binding sWaste}"
|
||||||
|
Width="65"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.Waste_Msg,
|
<TextBlock Text="{Binding Path=DataContext.Waste_Msg,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ Public Class RawPartListVM
|
|||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
Private m_RawPartColumns As New ObservableCollection(Of EgtDataGridColumn)
|
Private m_RawPartColumns As New ObservableCollection(Of String)
|
||||||
Public Property RawPartColumns As ObservableCollection(Of EgtDataGridColumn)
|
Public Property RawPartColumns As ObservableCollection(Of String)
|
||||||
Get
|
Get
|
||||||
Return m_RawPartColumns
|
Return m_RawPartColumns
|
||||||
End Get
|
End Get
|
||||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
Set(value As ObservableCollection(Of String))
|
||||||
m_RawPartColumns = value
|
m_RawPartColumns = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -75,19 +75,25 @@ Public Class RawPartListVM
|
|||||||
Sub New()
|
Sub New()
|
||||||
' Aggiungo riferimento a Map
|
' Aggiungo riferimento a Map
|
||||||
Map.SetRefRawPartListVM(Me)
|
Map.SetRefRawPartListVM(Me)
|
||||||
' carico le colonne della datagrid
|
' aggiungo colonne
|
||||||
GetPrivateProfileColumns(S_RAWPARTLIST_BEAM, RawPartColumns)
|
RawPartColumns.Add(COL_NAME)
|
||||||
|
RawPartColumns.Add(COL_CALC)
|
||||||
|
RawPartColumns.Add(COL_STARTCUT)
|
||||||
|
RawPartColumns.Add(COL_W)
|
||||||
|
RawPartColumns.Add(COL_H)
|
||||||
|
RawPartColumns.Add(COL_L)
|
||||||
|
RawPartColumns.Add(COL_MATERIAL)
|
||||||
|
RawPartColumns.Add(COL_USAGE)
|
||||||
|
RawPartColumns.Add(COL_WASTE)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
Friend Sub UpdateColumns(nMachType As MachineType)
|
Friend Sub UpdateColumns(nMachType As MachineType)
|
||||||
If nMachType = MachineType.BEAM Then
|
If nMachType = MachineType.BEAM Then
|
||||||
RawPartColumns.Clear()
|
If IsNothing(m_RawPartColumns.FirstOrDefault(Function(x) x = COL_STARTCUT)) Then m_RawPartColumns.Insert(2, COL_STARTCUT)
|
||||||
GetPrivateProfileColumns(S_RAWPARTLIST_BEAM, RawPartColumns)
|
|
||||||
ElseIf nMachType = MachineType.WALL Then
|
ElseIf nMachType = MachineType.WALL Then
|
||||||
RawPartColumns.Clear()
|
If Not IsNothing(m_RawPartColumns.FirstOrDefault(Function(x) x = COL_STARTCUT)) Then m_RawPartColumns.Remove(COL_STARTCUT)
|
||||||
GetPrivateProfileColumns(S_RAWPARTLIST_WALL, RawPartColumns)
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
Module ConstDataGridColumnsIni
|
|
||||||
|
|
||||||
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.ini"
|
|
||||||
|
|
||||||
Public Const S_FEATURELIST As String = "DG_FeatureList"
|
|
||||||
Public Const S_OPENPROJFILEDLG_PROJ As String = "DG_OpenProjectFileDialog_PROJ"
|
|
||||||
Public Const S_OPENPROJFILEDLG_PROD As String = "DG_OpenProjectFileDialog_PROD"
|
|
||||||
Public Const S_RAWPARTLIST_BEAM As String = "DG_RawPartList_BEAM"
|
|
||||||
Public Const S_RAWPARTLIST_WALL As String = "DG_RawPartList_WALL"
|
|
||||||
Public Const S_PARTINRAWPARTLIST_BEAM As String = "DG_PartInRawPartList_BEAM"
|
|
||||||
Public Const S_PARTINRAWPARTLIST_WALL As String = "DG_PartInRawPartList_WALL"
|
|
||||||
|
|
||||||
End Module
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
; Commento per evitare BOM con UTF-8
|
||||||
|
[Data]
|
||||||
|
DataRoot=C:\EgtData\EgtBEAMWALL
|
||||||
@@ -103,11 +103,14 @@
|
|||||||
<ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="EgtUILib">
|
<Reference Include="EgtUILib, Version=2.3.4.4, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\..\..\..\EgtProg\Dll32\EgtUILib.dll</HintPath>
|
<HintPath>..\packages\EgtUILib.2.3.4.4\lib\EgtUILib.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="EgtWPFLib5">
|
<Reference Include="EgtWPFLib, Version=2.2.11.1, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\..\..\..\EgtProg\Dll32\EgtWPFLib5.dll</HintPath>
|
<HintPath>..\packages\EgtWPFLib.2.1.11.1\lib\EgtWPFLib.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EgtWPFLib5, Version=2.3.4.3, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EgtWPF5Lib.2.3.4.3\lib\EgtWPFLib5.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
||||||
@@ -174,7 +177,6 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="BTLParam\PartInRawPartListVM.vb" />
|
<Compile Include="BTLParam\PartInRawPartListVM.vb" />
|
||||||
<Compile Include="BTLParam\PartListVM.vb" />
|
<Compile Include="BTLParam\PartListVM.vb" />
|
||||||
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
|
|
||||||
<Compile Include="Constants\ConstWarehouseIni.vb" />
|
<Compile Include="Constants\ConstWarehouseIni.vb" />
|
||||||
<Compile Include="FreeContourManager\FreeContourManagerV.xaml.vb">
|
<Compile Include="FreeContourManager\FreeContourManagerV.xaml.vb">
|
||||||
<DependentUpon>FreeContourManagerV.xaml</DependentUpon>
|
<DependentUpon>FreeContourManagerV.xaml</DependentUpon>
|
||||||
@@ -186,9 +188,10 @@
|
|||||||
<Compile Include="FreeContourInput\FreeContourInputVM.vb" />
|
<Compile Include="FreeContourInput\FreeContourInputVM.vb" />
|
||||||
<Compile Include="MachGroupPanel\BeamMachGroupVM.vb" />
|
<Compile Include="MachGroupPanel\BeamMachGroupVM.vb" />
|
||||||
<Compile Include="MachGroupPanel\BeamVM.vb" />
|
<Compile Include="MachGroupPanel\BeamVM.vb" />
|
||||||
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
<Compile Include="MachGroupPanel\MyMachGroupVM.vb" />
|
||||||
<Compile Include="MachGroupPanel\WallMachGroupVM.vb" />
|
<Compile Include="MachGroupPanel\PartVM.vb" />
|
||||||
<Compile Include="MachGroupPanel\WallVM.vb" />
|
<Compile Include="MachGroupPanel\WallVM.vb" />
|
||||||
|
<Compile Include="MachGroupPanel\WallMachGroupVM.vb" />
|
||||||
<Compile Include="ProjectTypeWnd\ProjectTypeWndV.xaml.vb">
|
<Compile Include="ProjectTypeWnd\ProjectTypeWndV.xaml.vb">
|
||||||
<DependentUpon>ProjectTypeWndV.xaml</DependentUpon>
|
<DependentUpon>ProjectTypeWndV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -217,7 +220,6 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
||||||
<Compile Include="Utility\MachineModel.vb" />
|
<Compile Include="Utility\MachineModel.vb" />
|
||||||
<Compile Include="Utility\DataGridColumnsIniFile.vb" />
|
|
||||||
<Compile Include="Utility\TreeViewItemBase.vb" />
|
<Compile Include="Utility\TreeViewItemBase.vb" />
|
||||||
<Compile Include="WarehouseWnd\WarehouseWndV.xaml.vb">
|
<Compile Include="WarehouseWnd\WarehouseWndV.xaml.vb">
|
||||||
<DependentUpon>WarehouseWndV.xaml</DependentUpon>
|
<DependentUpon>WarehouseWndV.xaml</DependentUpon>
|
||||||
@@ -490,6 +492,7 @@
|
|||||||
<DependentUpon>LeftPanelV.xaml</DependentUpon>
|
<DependentUpon>LeftPanelV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="LeftPanel\LeftPanelVM.vb" />
|
<Compile Include="LeftPanel\LeftPanelVM.vb" />
|
||||||
|
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||||
<Compile Include="MainMenu\MainMenuV.xaml.vb">
|
<Compile Include="MainMenu\MainMenuV.xaml.vb">
|
||||||
<DependentUpon>MainMenuV.xaml</DependentUpon>
|
<DependentUpon>MainMenuV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -598,11 +601,16 @@
|
|||||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
|
<None Include="DataRoot.ini">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Include="My Project\Settings.settings">
|
<None Include="My Project\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
|
<None Include="_Tools\postBuildTgt.bat" />
|
||||||
|
<None Include="_Tools\preBuildTgt.bat" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\EgtBEAMWALL.ico" />
|
<Resource Include="Resources\EgtBEAMWALL.ico" />
|
||||||
@@ -651,6 +659,29 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Behavior\" />
|
<Folder Include="Behavior\" />
|
||||||
|
<Folder Include="FreeContourMgr\" />
|
||||||
|
<Folder Include="_Readme\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="_BaseLib\c3d.dll" />
|
||||||
|
<Content Include="_BaseLib\EgtExchangeR32.dll" />
|
||||||
|
<Content Include="_BaseLib\EgtExecutorR32.dll" />
|
||||||
|
<Content Include="_BaseLib\EgtGeneralR32.dll" />
|
||||||
|
<Content Include="_BaseLib\EgtGeomKernelR32.dll" />
|
||||||
|
<Content Include="_BaseLib\EgtGraphicsR32.dll" />
|
||||||
|
<Content Include="_BaseLib\EgtInterfaceR32.dll" />
|
||||||
|
<Content Include="_BaseLib\EgtMachKernelR32.dll" />
|
||||||
|
<Content Include="_BaseLib\EgtNestingR32.dll" />
|
||||||
|
<Content Include="_BaseLib\EgtNumKernelR32.dll" />
|
||||||
|
<Content Include="_BaseLib\FreeImage.dll" />
|
||||||
|
<Content Include="_BaseLib\glew32.dll" />
|
||||||
|
<Content Include="_BaseLib\liblcnsR32.dll" />
|
||||||
|
<Content Include="_BaseLib\libwinpthread-1.dll" />
|
||||||
|
<Content Include="_BaseLib\lua53.dll" />
|
||||||
|
<Content Include="_BaseLib\od32.dll" />
|
||||||
|
<Content Include="_BaseLib\System.Data.SQLite.dll" />
|
||||||
|
<Content Include="_BaseLib\zipR32.dll" />
|
||||||
|
<Content Include="_BaseLib\zlibR32.dll" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\AboutBoxImage.png" />
|
<Resource Include="Resources\AboutBoxImage.png" />
|
||||||
@@ -730,10 +761,12 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR32.exe
|
<PostBuildEvent>
|
||||||
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerD32.exe
|
<!-- IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR32.exe
|
||||||
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR64.exe
|
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerD32.exe
|
||||||
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerD64.exe</PostBuildEvent>
|
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR64.exe
|
||||||
|
IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerD64.exe -->
|
||||||
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -743,4 +776,7 @@ IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPa
|
|||||||
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
|
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
|
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>"$(ProjectDir)_Tools\preBuildTgt.bat" "$(ProjectDir)_BaseLib" $(TargetDir)</PreBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -7,9 +7,15 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class BeamMachGroupVM
|
Public Class BeamMachGroupVM
|
||||||
Inherits Core.BeamMachGroupVM
|
Inherits MyMachGroupVM
|
||||||
|
|
||||||
Public Overrides Property sStartCut As String
|
Public ReadOnly Property m_BeamMachGroupM As BeamMachGroupM
|
||||||
|
Get
|
||||||
|
Return m_MachGroupM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sStartCut As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_BeamMachGroupM.dStartCut, 3)
|
Return LenToString(m_BeamMachGroupM.dStartCut, 3)
|
||||||
End Get
|
End Get
|
||||||
@@ -41,17 +47,53 @@ Public Class BeamMachGroupVM
|
|||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Public Property dStartCut As Double
|
||||||
|
Get
|
||||||
|
Return m_BeamMachGroupM.dStartCut
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_BeamMachGroupM.dStartCut = value
|
||||||
|
NotifyPropertyChanged(NameOf(sStartCut))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property SelBeam As BeamVM
|
||||||
|
Get
|
||||||
|
Return m_SelPart
|
||||||
|
End Get
|
||||||
|
Set(value As BeamVM)
|
||||||
|
m_SelPart = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
#Region "CONSTRUCTORS"
|
||||||
|
|
||||||
Sub New(BeamMachGroupM As BeamMachGroupM)
|
Sub New(BeamMachGroupM As BeamMachGroupM)
|
||||||
MyBase.New(BeamMachGroupM)
|
MyBase.New(BeamMachGroupM)
|
||||||
|
AddHandler m_BeamMachGroupM.PartAdded, AddressOf OnBeamAdded
|
||||||
|
AddHandler m_BeamMachGroupM.PartRemoved, AddressOf OnBeamRemoved
|
||||||
|
CreateBeamVMList()
|
||||||
|
' Aggiorno stato da stati feature
|
||||||
|
CalcGlobalUpdate()
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
#End Region ' CONSTRUCTORS
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Private Sub CreateBeamVMList()
|
||||||
|
Dim all As List(Of BeamVM) = (From BeamM In m_BeamMachGroupM.GetParts()
|
||||||
|
Select New BeamVM(BeamM, Me)).ToList()
|
||||||
|
|
||||||
|
For Each BeamVM As BeamVM In all
|
||||||
|
AddHandler BeamVM.PropertyChanged, AddressOf OnBeamVMPropertyChanged
|
||||||
|
Next
|
||||||
|
|
||||||
|
m_PartVMList = New ObservableCollection(Of PartVM)(all)
|
||||||
|
AddHandler m_PartVMList.CollectionChanged, AddressOf OnBeamVMListChanged
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub RefreshPartList()
|
Public Overrides Sub RefreshPartList()
|
||||||
' leggo StartCut da posizione primo pezzo
|
' leggo StartCut da posizione primo pezzo
|
||||||
Dim sInfo As String = ""
|
Dim sInfo As String = ""
|
||||||
@@ -169,12 +211,12 @@ Public Class BeamMachGroupVM
|
|||||||
FirstBeam.NotifyPropertyChanged(NameOf(FirstBeam.sOffset))
|
FirstBeam.NotifyPropertyChanged(NameOf(FirstBeam.sOffset))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Function Copy() As MyMachGroupVM
|
Friend Overrides Function Copy() As MyMachGroupVM
|
||||||
EgtResetCurrMachGroup()
|
EgtResetCurrMachGroup()
|
||||||
' recupero lista dei pezzi BTL originali
|
' recupero lista dei pezzi BTL originali
|
||||||
Dim PartList As New List(Of BTLPartVM)
|
Dim PartList As New List(Of BTLPartVM)
|
||||||
For Each Part In m_PartVMList
|
For Each Part In m_PartVMList
|
||||||
PartList.Add(BTLPartVM.RetrieveBTLPartFromPart(Part.nPartId))
|
PartList.Add(Part.RetrieveBTLPartFromPart())
|
||||||
Next
|
Next
|
||||||
' verifico che nessun pezzo da copiare abbia raggiunto il numero massimo
|
' verifico che nessun pezzo da copiare abbia raggiunto il numero massimo
|
||||||
If Not VerifyPartCount(PartList) Then Return Nothing
|
If Not VerifyPartCount(PartList) Then Return Nothing
|
||||||
@@ -258,7 +300,8 @@ Public Class BeamMachGroupVM
|
|||||||
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||||
While nRawPartId <> GDB_ID.NULL
|
While nRawPartId <> GDB_ID.NULL
|
||||||
If EgtRemovePartFromRawPart(nBeamId) Then
|
If EgtRemovePartFromRawPart(nBeamId) Then
|
||||||
Dim BTLPart As BTLPartVM = BTLPartVM.RetrieveBTLPartFromPart(nBeamId)
|
Dim Part As PartVM = PartVMList.FirstOrDefault(Function(x) x.nPartId = nBeamId)
|
||||||
|
Dim BTLPart As BTLPartVM = Part.RetrieveBTLPartFromPart()
|
||||||
EgtErase(nBeamId)
|
EgtErase(nBeamId)
|
||||||
If Not IsNothing(BTLPart) Then BTLPart.RefreshPartInProd()
|
If Not IsNothing(BTLPart) Then BTLPart.RefreshPartInProd()
|
||||||
End If
|
End If
|
||||||
@@ -293,4 +336,45 @@ Public Class BeamMachGroupVM
|
|||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub OnBeamAdded(sender As Object, e As PartAddedEventArgs)
|
||||||
|
Dim BeamVM As BeamVM = New BeamVM(e.NewPart, Me)
|
||||||
|
PartVMList.Add(BeamVM)
|
||||||
|
End Sub
|
||||||
|
Private Sub OnBeamRemoved(sender As Object, e As PartAddedEventArgs)
|
||||||
|
Dim BeamVM As BeamVM = PartVMList.FirstOrDefault(Function(x) x.PartM Is e.m_NewPart)
|
||||||
|
If Not IsNothing(BeamVM) Then PartVMList.Remove(BeamVM)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnBeamVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||||
|
If e.Action = NotifyCollectionChangedAction.Add Then
|
||||||
|
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||||
|
For Each BeamVM As BeamVM In e.NewItems
|
||||||
|
AddHandler BeamVM.PropertyChanged, AddressOf OnBeamVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If e.Action = NotifyCollectionChangedAction.Remove Then
|
||||||
|
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||||
|
For Each BeamVM As BeamVM In e.OldItems
|
||||||
|
RemoveHandler BeamVM.PropertyChanged, AddressOf OnBeamVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If e.Action = NotifyCollectionChangedAction.Move Then
|
||||||
|
Dim ItemVM As PartVM = e.OldItems(0)
|
||||||
|
m_BeamMachGroupM.PartMList.RemoveAt(e.OldStartingIndex)
|
||||||
|
m_BeamMachGroupM.PartMList.Insert(e.NewStartingIndex, ItemVM.PartM)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnBeamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
|
'Select Case e.PropertyName
|
||||||
|
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
||||||
|
'End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -5,9 +5,15 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class BeamVM
|
Public Class BeamVM
|
||||||
Inherits Core.BeamVM
|
Inherits PartVM
|
||||||
|
|
||||||
Public Overrides Property sOffset As String
|
Public ReadOnly Property m_BeamM As BeamM
|
||||||
|
Get
|
||||||
|
Return m_PartM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sOffset As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_BeamM.dOffset, 3)
|
Return LenToString(m_BeamM.dOffset, 3)
|
||||||
End Get
|
End Get
|
||||||
@@ -34,6 +40,11 @@ Public Class BeamVM
|
|||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property dOffset As Double
|
||||||
|
Get
|
||||||
|
Return m_BeamM.dOffset
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend Sub ResetOffset()
|
Friend Sub ResetOffset()
|
||||||
m_BeamM.dOffset = RawPartConfiguration.dBeamDist
|
m_BeamM.dOffset = RawPartConfiguration.dBeamDist
|
||||||
@@ -57,7 +68,7 @@ Public Class BeamVM
|
|||||||
' elimino pezzo copia
|
' elimino pezzo copia
|
||||||
EgtRemovePartFromRawPart(Me.nPartId)
|
EgtRemovePartFromRawPart(Me.nPartId)
|
||||||
' Recupero Id BTLPart originale
|
' Recupero Id BTLPart originale
|
||||||
Dim BTLPart As BTLPartVM = BTLPartVM.RetrieveBTLPartFromPart(nPartId)
|
Dim BTLPart As BTLPartVM = RetrieveBTLPartFromPart()
|
||||||
EgtErase(Me.nPartId)
|
EgtErase(Me.nPartId)
|
||||||
' rimuovo dalla lista pezzi
|
' rimuovo dalla lista pezzi
|
||||||
Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(ParentMachGroupVM.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
|
Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(ParentMachGroupVM.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
|
||||||
|
|||||||
@@ -6,16 +6,43 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class MyMachGroupPanelVM
|
Public Class MyMachGroupPanelVM
|
||||||
Inherits Core.MyMachGroupPanelVM
|
Inherits NewMachGroupPanelVM
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Public ReadOnly Property m_MyMachGroupPanelM As MyMachGroupPanelM
|
||||||
|
Get
|
||||||
|
Return m_MachGroupPanelM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sTotMachGroups As String
|
||||||
|
Get
|
||||||
|
Return Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sTotVolume As String
|
||||||
|
Get
|
||||||
|
Dim dMMTotVolume As Double = Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Sum(CType(Function(x As MyMachGroupVM) x.dUnitVolume, Func(Of MachGroupVM, Double)))
|
||||||
|
Return If(EgtUiUnitsAreMM(), DoubleToString(dMMTotVolume / 1000000000, 3), DoubleToString(dMMTotVolume * (12 / ONEINCH), 3))
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sTotTime As String
|
||||||
|
Get
|
||||||
|
Return TimeSpan.FromSeconds(Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Sum(CType(Function(x As MyMachGroupVM) x.nCALC_TIME, Func(Of MachGroupVM, Double)))).ToString()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New(MachGroupPanelM As MachGroupPanelM)
|
Sub New(MachGroupPanelM As MachGroupPanelM)
|
||||||
MyBase.New(MachGroupPanelM)
|
MyBase.New(MachGroupPanelM)
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefMachGroupPanelVM(Me)
|
||||||
' elimino copie da cancellare
|
' elimino copie da cancellare
|
||||||
DeleteDuplo()
|
DeleteDuplo()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -24,44 +51,44 @@ Public Class MyMachGroupPanelVM
|
|||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
'Protected Overrides Sub CreateMachGroupVMList()
|
Protected Overrides Sub CreateMachGroupVMList()
|
||||||
' Dim all As New List(Of MachGroupVM)
|
Dim all As New List(Of MachGroupVM)
|
||||||
' For Each MachGroupM In m_MachGroupPanelM.GetMachGroups()
|
For Each MachGroupM In m_MachGroupPanelM.GetMachGroups()
|
||||||
' If DirectCast(MachGroupM, MyMachGroupM).nMachineType = MachineType.BEAM Then
|
If DirectCast(MachGroupM, MyMachGroupM).nMachineType = MachineType.BEAM Then
|
||||||
' all.Add(New BeamMachGroupVM(MachGroupM))
|
all.Add(New BeamMachGroupVM(MachGroupM))
|
||||||
' Else
|
Else
|
||||||
' all.Add(New WallMachGroupVM(MachGroupM))
|
all.Add(New WallMachGroupVM(MachGroupM))
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
|
|
||||||
' For Each MachGroupvM As MachGroupVM In all
|
For Each MachGroupvM As MachGroupVM In all
|
||||||
' AddHandler MachGroupvM.PropertyChanged, AddressOf OnMachGroupVMPropertyChanged
|
AddHandler MachGroupvM.PropertyChanged, AddressOf OnMachGroupVMPropertyChanged
|
||||||
' Next
|
Next
|
||||||
|
|
||||||
' MachGroupVMList = New ObservableCollection(Of MachGroupVM)(all)
|
MachGroupVMList = New ObservableCollection(Of MachGroupVM)(all)
|
||||||
' AddHandler MachGroupVMList.CollectionChanged, AddressOf OnMachGroupVMListChanged
|
AddHandler MachGroupVMList.CollectionChanged, AddressOf OnMachGroupVMListChanged
|
||||||
'End Sub
|
End Sub
|
||||||
|
|
||||||
'Public Overrides Function InitMachGroupList(Optional bUseDefaults As Boolean = False) As Boolean
|
Public Overrides Function InitMachGroupList(Optional bUseDefaults As Boolean = False) As Boolean
|
||||||
' ' Svuoto precedente lista di MachGroup
|
' Svuoto precedente lista di MachGroup
|
||||||
' MachGroupVMList.Clear()
|
MachGroupVMList.Clear()
|
||||||
' ' aggiorno copie
|
' aggiorno copie
|
||||||
' MyMachGroupPanelM.UpdateDuplo()
|
MyMachGroupPanelM.UpdateDuplo()
|
||||||
' ' verifico se esistono già gruppi di lavorazione o se devo creare il primo
|
' verifico se esistono già gruppi di lavorazione o se devo creare il primo
|
||||||
' Dim bOk As Boolean = False
|
Dim bOk As Boolean = False
|
||||||
' Dim nId = EgtGetFirstMachGroup()
|
Dim nId = EgtGetFirstMachGroup()
|
||||||
' If nId <> GDB_ID.NULL Then
|
If nId <> GDB_ID.NULL Then
|
||||||
' bOk = EgtSetCurrMachGroup(nId)
|
bOk = EgtSetCurrMachGroup(nId)
|
||||||
' End If
|
End If
|
||||||
' If Not bOk Then Return True
|
If Not bOk Then Return True
|
||||||
' ' carico lista dei gruppi di lavorazione
|
' carico lista dei gruppi di lavorazione
|
||||||
' m_MachGroupPanelM.MachGroupMList = MyMachGroupPanelM.LoadMyMachGroups(Map.refMachinePanelVM.MachineList.ToList())
|
m_MachGroupPanelM.MachGroupMList = MyMachGroupPanelM.LoadMyMachGroups(Map.refMachinePanelVM.MachineList.ToList())
|
||||||
' ' elimino copie da cancellare
|
' elimino copie da cancellare
|
||||||
' MyMachGroupPanelM.DeleteDuplo()
|
MyMachGroupPanelM.DeleteDuplo()
|
||||||
' If bOk Then SelectedMachGroup = MachGroupVMList(0)
|
If bOk Then SelectedMachGroup = MachGroupVMList(0)
|
||||||
' EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
' Return True
|
Return True
|
||||||
'End Function
|
End Function
|
||||||
|
|
||||||
Public Function RefreshMachGroupList() As Boolean
|
Public Function RefreshMachGroupList() As Boolean
|
||||||
' carico lista dei gruppi di lavorazione
|
' carico lista dei gruppi di lavorazione
|
||||||
@@ -72,7 +99,7 @@ Public Class MyMachGroupPanelVM
|
|||||||
For Each MachGroup As MyMachGroupVM In MachGroupVMList
|
For Each MachGroup As MyMachGroupVM In MachGroupVMList
|
||||||
For Each Part In MachGroup.PartVMList
|
For Each Part In MachGroup.PartVMList
|
||||||
' aggiorno calcolo pezzi in produzione
|
' aggiorno calcolo pezzi in produzione
|
||||||
Dim BTLPart As BTLPartVM = BTLPartVM.RetrieveBTLPartFromPart(Part.nPartId)
|
Dim BTLPart As BTLPartVM = Part.RetrieveBTLPartFromPart()
|
||||||
If Not IsNothing(BTLPart) Then BTLPart.RefreshPartInProd()
|
If Not IsNothing(BTLPart) Then BTLPart.RefreshPartInProd()
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
@@ -158,6 +185,32 @@ Public Class MyMachGroupPanelVM
|
|||||||
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Function OnPreSetCurrMachGroup() As Boolean
|
||||||
|
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overrides Function OnPostSetCurrMachGroup() As Boolean
|
||||||
|
' resetto eventuale selezione pezzo
|
||||||
|
DirectCast(SelectedMachGroup, MyMachGroupVM).SelPart = Nothing
|
||||||
|
' Imposto vista solo tavola
|
||||||
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
|
Dim View As VT
|
||||||
|
For Each Mach As MyMachine In Map.refMachinePanelVM.MachineList
|
||||||
|
If Mach.Name = SelectedMachGroup.Machine Then
|
||||||
|
If Mach.nType = Core.ConstBeam.MachineType.BEAM Then
|
||||||
|
View = VT.ISO_SW
|
||||||
|
Else
|
||||||
|
View = VT.TOP
|
||||||
|
End If
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
EgtSetView(View, False)
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
' funzione che seleziona primo gruppo
|
' funzione che seleziona primo gruppo
|
||||||
Friend Sub SelFirstMachGroup()
|
Friend Sub SelFirstMachGroup()
|
||||||
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||||
@@ -170,7 +223,56 @@ Public Class MyMachGroupPanelVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' funzione che seleziona ultimo gruppo
|
||||||
|
Friend Sub SelLastMachGroup()
|
||||||
|
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||||
|
SelectedMachGroup = MachGroupVMList(MachGroupVMList.Count - 1)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function GetLastMachGroup() As MachGroupVM
|
||||||
|
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||||
|
Return MachGroupVMList(MachGroupVMList.Count - 1)
|
||||||
|
End If
|
||||||
|
Return Nothing
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' funzione che aggiorna totale tempi a fine calcolo
|
||||||
|
Friend Sub CalcGlobalTime()
|
||||||
|
NotifyPropertyChanged(NameOf(sTotTime))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che aggiorna numero gruppi di lavorazione e volume totale
|
||||||
|
Friend Sub CalcGlobalUpdate()
|
||||||
|
NotifyPropertyChanged(NameOf(sTotMachGroups))
|
||||||
|
NotifyPropertyChanged(NameOf(sTotVolume))
|
||||||
|
NotifyPropertyChanged(NameOf(sTotTime))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Protected Overrides Sub OnMachGroupAdded(sender As Object, e As MachGroupAddedEventArgs)
|
||||||
|
Dim MachGroupVM As MachGroupVM = Nothing
|
||||||
|
Select Case DirectCast(e.NewMachGroupM, MyMachGroupM).nMachineType
|
||||||
|
Case Core.ConstBeam.MachineType.BEAM
|
||||||
|
MachGroupVM = New BeamMachGroupVM(e.NewMachGroupM)
|
||||||
|
Case Core.ConstBeam.MachineType.WALL
|
||||||
|
MachGroupVM = New WallMachGroupVM(e.NewMachGroupM)
|
||||||
|
Case Core.ConstBeam.MachineType.NULL
|
||||||
|
Return
|
||||||
|
End Select
|
||||||
|
MachGroupVMList.Add(MachGroupVM)
|
||||||
|
NotifyPropertyChanged(NameOf(MachGroupVMList))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub OnMachGroupVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
|
Select Case e.PropertyName
|
||||||
|
'Case nameof(sender.sMATERIAL)
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' EVENTS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -7,8 +7,263 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public MustInherit Class MyMachGroupVM
|
Public MustInherit Class MyMachGroupVM
|
||||||
Inherits Core.MyMachGroupVM
|
Inherits MachGroupVM
|
||||||
|
|
||||||
|
Public ReadOnly Property MyMachGroupM As MyMachGroupM
|
||||||
|
Get
|
||||||
|
Return m_MachGroupM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nMachineType As MachineType
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nMachineType
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dL As Double
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dL
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
MyMachGroupM.dL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dW As Double
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dW
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
MyMachGroupM.dW = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dH As Double
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dH
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
MyMachGroupM.dH = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dtStartTime As DateTime
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dtStartTime
|
||||||
|
End Get
|
||||||
|
Set(value As DateTime)
|
||||||
|
MyMachGroupM.dtStartTime = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dtEndTime As DateTime
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.dtEndTime
|
||||||
|
End Get
|
||||||
|
Set(value As DateTime)
|
||||||
|
MyMachGroupM.dtEndTime = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property dUsage As Double
|
||||||
|
Get
|
||||||
|
Return If(MyMachGroupM.dMatForPart > 0 AndAlso MyMachGroupM.dTotMat > 0, MyMachGroupM.dMatForPart / MyMachGroupM.dTotMat * 100, 0)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property dWaste As Double
|
||||||
|
Get
|
||||||
|
Return If(MyMachGroupM.dMatForPart > 0 AndAlso MyMachGroupM.dTotMat > 0, (MyMachGroupM.dTotMat - MyMachGroupM.dMatForPart) / MyMachGroupM.dTotMat * 100, 0)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sUsage As String
|
||||||
|
Get
|
||||||
|
Return DoubleToString(dUsage, 3)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sWaste As String
|
||||||
|
Get
|
||||||
|
Return DoubleToString(dWaste, 3)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sMATERIAL As String
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.sMATERIAL
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
MyMachGroupM.sMATERIAL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' lista dei pezzi che sono nel grezzo
|
||||||
|
Protected m_PartVMList As New ObservableCollection(Of PartVM)
|
||||||
|
Public Property PartVMList As ObservableCollection(Of PartVM)
|
||||||
|
Get
|
||||||
|
Return m_PartVMList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of PartVM))
|
||||||
|
m_PartVMList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected m_SelPart As PartVM
|
||||||
|
Public Overridable Property SelPart As PartVM
|
||||||
|
Get
|
||||||
|
Return m_SelPart
|
||||||
|
End Get
|
||||||
|
Set(value As PartVM)
|
||||||
|
m_SelPart = value
|
||||||
|
' seleziono pezzo
|
||||||
|
EgtDeselectAll()
|
||||||
|
If Not IsNothing(value) Then EgtSelectObj(SelPart.nPartId)
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(SelPart))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nCALC_ERR As Integer
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nCALC_ERR
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nCALC_FALL As Integer
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nCALC_FALL
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sCALC_MSG As String
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.sCALC_MSG
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCALC_ROT As Integer
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nCALC_ROT
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
MyMachGroupM.nCALC_ROT = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCALC_TIME As Integer
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nCALC_TIME
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
MyMachGroupM.nCALC_TIME = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nGlobalState As CalcStates
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nCALC_GlobalState
|
||||||
|
End Get
|
||||||
|
Set(value As CalcStates)
|
||||||
|
MyMachGroupM.nCALC_GlobalState = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nState As CalcStates
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nCALC_State
|
||||||
|
End Get
|
||||||
|
Set(value As CalcStates)
|
||||||
|
MyMachGroupM.nCALC_State = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nProductionState As Integer
|
||||||
|
Get
|
||||||
|
Return MyMachGroupM.nProductionState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||||
|
Get
|
||||||
|
If MyMachGroupM.nCALC_GlobalState = CalcStates.OK Then
|
||||||
|
Return Brushes.Green
|
||||||
|
ElseIf MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED Then
|
||||||
|
Return Brushes.LightGray
|
||||||
|
ElseIf MyMachGroupM.nCALC_GlobalState = CalcStates.INFO Then
|
||||||
|
Return Brushes.Green
|
||||||
|
ElseIf MyMachGroupM.nCALC_GlobalState = CalcStates.WARNING Then
|
||||||
|
Return Brushes.Gold
|
||||||
|
ElseIf MyMachGroupM.nCALC_GlobalState = CalcStates.ERROR_ Then
|
||||||
|
Return Brushes.Red
|
||||||
|
Else
|
||||||
|
Return Brushes.Red
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(MyMachGroupM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(MyMachGroupM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ERR_Letter As String
|
||||||
|
Get
|
||||||
|
Select Case MyMachGroupM.nCALC_GlobalERR
|
||||||
|
Case 22
|
||||||
|
Return "c"
|
||||||
|
Case 19, 23, 24, 25
|
||||||
|
Return "e"
|
||||||
|
Case 17
|
||||||
|
Return "w"
|
||||||
|
Case < 0
|
||||||
|
Return "i"
|
||||||
|
Case Else
|
||||||
|
Return ""
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Select Case MyMachGroupM.m_nCALC_GlobalState
|
||||||
|
Case CalcStates.ERROR_
|
||||||
|
Return Brushes.Red
|
||||||
|
Case CalcStates.WARNING
|
||||||
|
Return Brushes.Orange
|
||||||
|
Case CalcStates.INFO
|
||||||
|
Return Brushes.Green
|
||||||
|
Case Else
|
||||||
|
Return Brushes.Red
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sUnitTime As String
|
||||||
|
Get
|
||||||
|
Return TimeSpan.FromSeconds(nCALC_TIME).ToString()
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property dUnitVolume As Double
|
||||||
|
Get
|
||||||
|
Return dL * dW * dH
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Section As SectionXMaterial
|
||||||
|
Get
|
||||||
|
Return New SectionXMaterial(dW, dH, dL, MyMachGroupM.sMATERIAL)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
' definizione comandi
|
' definizione comandi
|
||||||
Private m_cmdDeleteMachGroup As ICommand
|
Private m_cmdDeleteMachGroup As ICommand
|
||||||
@@ -17,14 +272,104 @@ Public MustInherit Class MyMachGroupVM
|
|||||||
|
|
||||||
Sub New(MyMachGroupM As MyMachGroupM)
|
Sub New(MyMachGroupM As MyMachGroupM)
|
||||||
MyBase.New(MyMachGroupM)
|
MyBase.New(MyMachGroupM)
|
||||||
|
'aggiorno lista pezzi
|
||||||
|
RefreshPartList()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
#End Region ' CONSTRUCTORS
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Friend MustOverride Function Copy() As MyMachGroupVM
|
||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
|
Public MustOverride Sub RefreshPartList()
|
||||||
|
|
||||||
|
Public MustOverride Sub RefreshGroupData()
|
||||||
|
|
||||||
|
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||||
|
Friend Sub CalcMachGroupUpdate(ERR As Integer, ROT As Integer, MSG As String)
|
||||||
|
EgtSetInfo(Id, ITG_PROD_ERR, ERR, True)
|
||||||
|
EgtSetInfo(Id, ITG_PROD_MSG, MSG, True)
|
||||||
|
EgtSetInfo(Id, ITG_PROD_ROT, ROT, True)
|
||||||
|
MyMachGroupM.nCALC_ERR = ERR
|
||||||
|
MyMachGroupM.nCALC_ROT = ROT
|
||||||
|
MyMachGroupM.sCALC_MSG = MSG
|
||||||
|
If ERR = 0 Then
|
||||||
|
nState = CalcStates.OK
|
||||||
|
ElseIf ERR = 17 Then
|
||||||
|
nState = CalcStates.WARNING
|
||||||
|
ElseIf ERR > 0 Then
|
||||||
|
nState = CalcStates.ERROR_
|
||||||
|
ElseIf ERR < 0 Then
|
||||||
|
nState = CalcStates.INFO
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ResetCalcMachGroup()
|
||||||
|
EgtRemoveInfo(Id, ITG_PROD_ERR)
|
||||||
|
EgtRemoveInfo(Id, ITG_PROD_MSG)
|
||||||
|
EgtRemoveInfo(Id, ITG_PROD_ROT)
|
||||||
|
MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
||||||
|
MyMachGroupM.nCALC_State = CalcStates.NOTCALCULATED
|
||||||
|
MyMachGroupM.nCALC_GlobalERR = 0
|
||||||
|
MyMachGroupM.nCALC_ERR = 0
|
||||||
|
MyMachGroupM.nCALC_ROT = 0
|
||||||
|
MyMachGroupM.nCALC_FALL = 0
|
||||||
|
MyMachGroupM.sCALC_MSG = ""
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||||
|
Friend Sub CalcGlobalUpdate()
|
||||||
|
MyMachGroupM.nCALC_GlobalERR = nCALC_ERR
|
||||||
|
MyMachGroupM.nCALC_GlobalState = nState
|
||||||
|
For Each Part In MyMachGroupM.PartMList
|
||||||
|
If Part.nCALC_GlobalState = CalcStates.NOTCALCULATED Then
|
||||||
|
MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
||||||
|
Exit For
|
||||||
|
ElseIf Part.nCALC_GlobalState = CalcStates.OK AndAlso MyMachGroupM.m_nCALC_GlobalState = Core.CalcStates.NOTCALCULATED Then
|
||||||
|
MyMachGroupM.nCALC_GlobalState = CalcStates.OK
|
||||||
|
ElseIf Part.nCALC_GlobalState = CalcStates.INFO And (MyMachGroupM.nCALC_GlobalState = CalcStates.OK Or MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED) Then
|
||||||
|
MyMachGroupM.nCALC_GlobalState = CalcStates.INFO
|
||||||
|
ElseIf Part.nCALC_GlobalState = CalcStates.WARNING And (MyMachGroupM.nCALC_GlobalState = CalcStates.OK Or MyMachGroupM.nCALC_GlobalState = CalcStates.INFO Or MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED) Then
|
||||||
|
MyMachGroupM.nCALC_GlobalState = CalcStates.WARNING
|
||||||
|
ElseIf Part.nCALC_GlobalState = CalcStates.ERROR_ And (MyMachGroupM.nCALC_GlobalState = CalcStates.OK Or MyMachGroupM.nCALC_GlobalState = CalcStates.INFO Or MyMachGroupM.nCALC_GlobalState = CalcStates.WARNING Or MyMachGroupM.nCALC_GlobalState = CalcStates.NOTCALCULATED) Then
|
||||||
|
MyMachGroupM.nCALC_GlobalState = CalcStates.ERROR_
|
||||||
|
End If
|
||||||
|
If Part.nCALC_GlobalERR = 22 Then
|
||||||
|
MyMachGroupM.nCALC_GlobalERR = 22
|
||||||
|
ElseIf Part.nCALC_GlobalERR > 0 And MyMachGroupM.nCALC_GlobalERR <= 0 Then
|
||||||
|
MyMachGroupM.nCALC_GlobalERR = Part.nCALC_GlobalERR
|
||||||
|
ElseIf Part.nCALC_GlobalERR < 0 And MyMachGroupM.nCALC_GlobalERR = 0 Then
|
||||||
|
MyMachGroupM.nCALC_GlobalERR = Part.nCALC_GlobalERR
|
||||||
|
End If
|
||||||
|
If Part.nCALC_ROT <> 0 Then
|
||||||
|
MyMachGroupM.m_nCALC_ROT = Part.nCALC_ROT
|
||||||
|
End If
|
||||||
|
If Part.nCALC_FALL <> 0 Then
|
||||||
|
MyMachGroupM.nCALC_FALL = Part.nCALC_FALL
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub CalcTimeUpdate(TIME As Integer)
|
||||||
|
EgtSetInfo(Id, ITG_PROD_TIME, TIME, True)
|
||||||
|
nCALC_TIME = TIME
|
||||||
|
NotifyPropertyChanged(NameOf(sUnitTime))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "DeleteMachGroup"
|
#Region "DeleteMachGroup"
|
||||||
|
|||||||
@@ -9,22 +9,524 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public MustInherit Class PartVM
|
Public MustInherit Class PartVM
|
||||||
Inherits Core.PartVM
|
Inherits VMBase
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Protected m_PartM As PartM
|
||||||
|
Public ReadOnly Property PartM As PartM
|
||||||
|
Get
|
||||||
|
Return m_PartM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected m_ParentMachGroupVM As MyMachGroupVM
|
||||||
|
Public ReadOnly Property ParentMachGroupVM As MyMachGroupVM
|
||||||
|
Get
|
||||||
|
Return m_ParentMachGroupVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Id geometrico del pezzo
|
||||||
|
Public ReadOnly Property nPartId As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nPartId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Proj del pezzo
|
||||||
|
Public Property nProjId As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nProjId
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nProjId = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Info del pezzo
|
||||||
|
Public ReadOnly Property nPDN As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nPDN
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sNAM As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.sNAM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sL As String
|
||||||
|
Get
|
||||||
|
Return LenToString(m_PartM.dL, 3)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Property dL As Double
|
||||||
|
Get
|
||||||
|
Return m_PartM.dL
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_PartM.dL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sW As String
|
||||||
|
Get
|
||||||
|
Return LenToString(m_PartM.dW, 3)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Property dW As Double
|
||||||
|
Get
|
||||||
|
Return m_PartM.dW
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_PartM.dW = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sH As String
|
||||||
|
Get
|
||||||
|
Return LenToString(m_PartM.dH, 3)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Property dH As Double
|
||||||
|
Get
|
||||||
|
Return m_PartM.dH
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_PartM.dH = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Overridable Property sPOSX As String
|
||||||
|
Get
|
||||||
|
Return LenToString(m_PartM.dPOSX, 3)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
StringToLen(value, m_PartM.dPOSX)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Property dPOSX As Double
|
||||||
|
Get
|
||||||
|
Return m_PartM.dPOSX
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_PartM.dPOSX = value
|
||||||
|
NotifyPropertyChanged(NameOf(sPOSX))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCNT As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCNT
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nCNT = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sINVERTED As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.nINVERTED & "°"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sROTATED As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.nROTATED & "°"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property sMATERIAL As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.sMATERIAL
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_PartM.sMATERIAL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nGlobalState As CalcStates
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_GlobalState
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCALC_GlobalERR As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_GlobalERR
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nCALC_GlobalERR = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nState As CalcStates
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_State
|
||||||
|
End Get
|
||||||
|
Set(value As CalcStates)
|
||||||
|
m_PartM.nCALC_State = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Calc_Background As SolidColorBrush
|
||||||
|
Get
|
||||||
|
If m_PartM.nCALC_GlobalState = CalcStates.OK Then
|
||||||
|
Return Brushes.Green
|
||||||
|
ElseIf m_PartM.nCALC_GlobalState = CalcStates.NOTCALCULATED Then
|
||||||
|
Return Brushes.LightGray
|
||||||
|
ElseIf m_PartM.nCALC_GlobalState = CalcStates.INFO Then
|
||||||
|
Return Brushes.Green
|
||||||
|
ElseIf m_PartM.nCALC_GlobalState = CalcStates.WARNING Then
|
||||||
|
Return Brushes.Orange
|
||||||
|
ElseIf m_PartM.nCALC_GlobalState = CalcStates.ERROR_ Then
|
||||||
|
Return Brushes.Red
|
||||||
|
Else
|
||||||
|
Return Brushes.Red
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(m_PartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return If(m_PartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ERR_Letter As String
|
||||||
|
Get
|
||||||
|
Select Case m_PartM.nCALC_GlobalERR
|
||||||
|
Case 22
|
||||||
|
Return "c"
|
||||||
|
Case 19, 23, 24, 25
|
||||||
|
Return "e"
|
||||||
|
Case 17
|
||||||
|
Return "w"
|
||||||
|
Case < 0
|
||||||
|
Return "i"
|
||||||
|
Case Else
|
||||||
|
Return ""
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CALC_ERR_Foreground As SolidColorBrush
|
||||||
|
Get
|
||||||
|
Select Case m_PartM.nCALC_GlobalState
|
||||||
|
Case CalcStates.ERROR_
|
||||||
|
Return Brushes.Red
|
||||||
|
Case CalcStates.WARNING
|
||||||
|
Return Brushes.Orange
|
||||||
|
Case CalcStates.INFO
|
||||||
|
Return Brushes.Green
|
||||||
|
Case Else
|
||||||
|
Return Brushes.Red
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nCALC_ERR As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_ERR
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sCALC_MSG As String
|
||||||
|
Get
|
||||||
|
Return m_PartM.sCALC_MSG
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCALC_ROT As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_ROT
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nCALC_ROT = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCALC_FALL As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_FALL
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nCALC_FALL = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property nCALC_TIME As Integer
|
||||||
|
Get
|
||||||
|
Return m_PartM.nCALC_TIME
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_PartM.nCALC_TIME = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' lista delle feature del pezzo
|
||||||
|
Protected m_FeatureVMList As ObservableCollection(Of BTLFeatureVM)
|
||||||
|
Public Property FeatureVMList As ObservableCollection(Of BTLFeatureVM)
|
||||||
|
Get
|
||||||
|
Return m_FeatureVMList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of BTLFeatureVM))
|
||||||
|
m_FeatureVMList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected m_SelFeatureVM As BTLFeatureVM
|
||||||
|
Public Property SelFeatureVM As BTLFeatureVM
|
||||||
|
Get
|
||||||
|
Return m_SelFeatureVM
|
||||||
|
End Get
|
||||||
|
Set(value As BTLFeatureVM)
|
||||||
|
m_SelFeatureVM = value
|
||||||
|
If Not IsNothing(m_SelFeatureVM) Then
|
||||||
|
DirectCast(m_SelFeatureVM, BTLFeatureVM).SelGeomFeature()
|
||||||
|
Else
|
||||||
|
EgtDeselectAll()
|
||||||
|
End If
|
||||||
|
EgtDraw()
|
||||||
|
NotifyPropertyChanged(NameOf(SelFeatureVM))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dtStartTime As DateTime
|
||||||
|
Get
|
||||||
|
Return m_PartM.dtStartTime
|
||||||
|
End Get
|
||||||
|
Set(value As DateTime)
|
||||||
|
m_PartM.dtStartTime = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property dtEndTime As DateTime
|
||||||
|
Get
|
||||||
|
Return m_PartM.dtEndTime
|
||||||
|
End Get
|
||||||
|
Set(value As DateTime)
|
||||||
|
m_PartM.dtEndTime = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' definizione comandi
|
||||||
|
Private m_cmdDeletePart As ICommand
|
||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New(PartM As PartM, ParentMachGroupVM As MyMachGroupVM)
|
Sub New(PartM As PartM, ParentMachGroupVM As MyMachGroupVM)
|
||||||
MyBase.New(PartM, ParentMachGroupVM)
|
m_PartM = PartM
|
||||||
|
m_ParentMachGroupVM = ParentMachGroupVM
|
||||||
|
AddHandler m_PartM.BTLFeatureAdded, AddressOf OnBTLFeatureAdded
|
||||||
|
CreateBTLFeatureVMList()
|
||||||
|
' Aggiorno stato da stati feature
|
||||||
|
CalcGlobalUpdate()
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||||
End Sub
|
End Sub
|
||||||
|
'Sub New(nParentMachGroup As MyMachGroupM, nPartId As Integer)
|
||||||
|
' m_ParentMachGroup = nParentMachGroup
|
||||||
|
' SetPartId(nPartId)
|
||||||
|
' m_FeatureVMList = New ObservableCollection(Of BTLFeatureM)
|
||||||
|
'End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|
||||||
|
Private Sub CreateBTLFeatureVMList()
|
||||||
|
Dim all As List(Of BTLFeatureVM) = (From BTLFeatureM In m_PartM.GetBTLFeatures()
|
||||||
|
Select New BTLFeatureVM(BTLFeatureM)).ToList()
|
||||||
|
|
||||||
|
For Each BTLFeatureVM As BTLFeatureVM In all
|
||||||
|
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
||||||
|
Next
|
||||||
|
|
||||||
|
m_FeatureVMList = New ObservableCollection(Of BTLFeatureVM)(all)
|
||||||
|
AddHandler m_FeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||||
|
Public Sub CalcPartUpdate(ERR As Integer, ROT As Integer, MSG As String)
|
||||||
|
EgtSetInfo(nPartId, ITG_PROD_ERR, ERR, True)
|
||||||
|
EgtSetInfo(nPartId, ITG_PROD_MSG, MSG, True)
|
||||||
|
EgtSetInfo(nPartId, ITG_PROD_ROT, ROT, True)
|
||||||
|
m_PartM.nCALC_ERR = ERR
|
||||||
|
m_PartM.nCALC_ROT = ROT
|
||||||
|
m_PartM.sCALC_MSG = MSG
|
||||||
|
If ERR = 0 Then
|
||||||
|
nState = CalcStates.OK
|
||||||
|
ElseIf ERR = 17 Then
|
||||||
|
nState = CalcStates.WARNING
|
||||||
|
ElseIf ERR > 0 Then
|
||||||
|
nState = CalcStates.ERROR_
|
||||||
|
ElseIf ERR < 0 Then
|
||||||
|
nState = CalcStates.INFO
|
||||||
|
End If
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ResetCalcPart()
|
||||||
|
EgtRemoveInfo(nPartId, ITG_PROD_ERR)
|
||||||
|
EgtRemoveInfo(nPartId, ITG_PROD_MSG)
|
||||||
|
EgtRemoveInfo(nPartId, ITG_PROD_ROT)
|
||||||
|
EgtRemoveInfo(nPartId, ITG_PROD_FALL)
|
||||||
|
m_PartM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
||||||
|
m_PartM.nCALC_State = CalcStates.NOTCALCULATED
|
||||||
|
m_PartM.nCALC_GlobalERR = 0
|
||||||
|
m_PartM.nCALC_ERR = 0
|
||||||
|
m_PartM.nCALC_ROT = 0
|
||||||
|
m_PartM.nCALC_FALL = 0
|
||||||
|
m_PartM.sCALC_MSG = ""
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||||
|
ParentMachGroupVM.ResetCalcMachGroup()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub CalcFallUpdate(FALL As Integer)
|
||||||
|
EgtSetInfo(nPartId, ITG_PROD_FALL, FALL, True)
|
||||||
|
m_PartM.nCALC_FALL = 0
|
||||||
|
NotifyPropertyChanged(NameOf(nCALC_FALL))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che aggiorna lo stato e gli errori dopo calcolo
|
||||||
|
Public Sub CalcGlobalUpdate()
|
||||||
|
m_PartM.nCALC_GlobalState = nState
|
||||||
|
For Each Feature In FeatureVMList
|
||||||
|
If Not Feature.bDO Then
|
||||||
|
ElseIf Feature.nState = CalcStates.NOTCALCULATED Then
|
||||||
|
m_PartM.nCALC_GlobalState = CalcStates.NOTCALCULATED
|
||||||
|
Exit For
|
||||||
|
ElseIf Feature.nState = CalcStates.INFO And m_PartM.nCALC_GlobalState = CalcStates.OK Then
|
||||||
|
m_PartM.nCALC_GlobalState = CalcStates.INFO
|
||||||
|
ElseIf Feature.nState = CalcStates.WARNING And (m_PartM.nCALC_GlobalState = CalcStates.OK Or m_PartM.nCALC_GlobalState = CalcStates.INFO) Then
|
||||||
|
m_PartM.nCALC_GlobalState = CalcStates.WARNING
|
||||||
|
ElseIf Feature.nState = CalcStates.ERROR_ And (m_PartM.nCALC_GlobalState = CalcStates.OK Or m_PartM.nCALC_GlobalState = CalcStates.INFO Or m_PartM.nCALC_GlobalState = CalcStates.WARNING) Then
|
||||||
|
m_PartM.nCALC_GlobalState = CalcStates.ERROR_
|
||||||
|
End If
|
||||||
|
If Feature.nCALC_ERR = 22 Then
|
||||||
|
m_PartM.nCALC_GlobalERR = 22
|
||||||
|
ElseIf Feature.nCALC_ERR > 0 And m_PartM.nCALC_GlobalERR <= 0 Then
|
||||||
|
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
||||||
|
ElseIf Feature.nCALC_ERR < 0 And m_PartM.nCALC_GlobalERR = 0 Then
|
||||||
|
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
NotifyPropertyChanged(NameOf(Calc_Background))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "DeletePart"
|
||||||
|
|
||||||
|
' Returns a command that manage the MainWindow_Unloaded command
|
||||||
|
Public ReadOnly Property DeletePart_Command() As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDeletePart Is Nothing Then
|
||||||
|
m_cmdDeletePart = New Command(AddressOf DeletePart)
|
||||||
|
End If
|
||||||
|
Return m_cmdDeletePart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||||
|
Public Overridable Sub DeletePart()
|
||||||
|
EgtRemovePartFromRawPart(m_PartM.nPartId)
|
||||||
|
' Recupero Id BTLPart originale
|
||||||
|
Dim BTLPart As BTLPartVM = RetrieveBTLPartFromPart()
|
||||||
|
' elimino pezzo copia
|
||||||
|
EgtErase(m_PartM.nPartId)
|
||||||
|
' elimino info pezzo su mach group
|
||||||
|
Dim sInfo As String = ""
|
||||||
|
Dim Index As Integer = 1
|
||||||
|
Dim sSplitInfo() As String
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
While EgtGetInfo(ParentMachGroupVM.Id, MGR_RPT_PART & Index, sInfo)
|
||||||
|
If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||||
|
sSplitInfo = sInfo.Split(","c)
|
||||||
|
If bFound Then
|
||||||
|
EgtSetInfo(ParentMachGroupVM.Id, MGR_RPT_PART & Index - 1, sInfo)
|
||||||
|
End If
|
||||||
|
If sSplitInfo(0) = nPartId Then
|
||||||
|
bFound = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Index += 1
|
||||||
|
End While
|
||||||
|
If bFound Then
|
||||||
|
EgtSetInfo(ParentMachGroupVM.Id, MGR_RPT_PART & Index - 1, "")
|
||||||
|
End If
|
||||||
|
' rimuovo dalla lista pezzi
|
||||||
|
Index = ParentMachGroupVM.PartVMList.IndexOf(Me)
|
||||||
|
If Index = 0 Then
|
||||||
|
If ParentMachGroupVM.PartVMList.Count > 0 Then
|
||||||
|
ParentMachGroupVM.SelPart = ParentMachGroupVM.PartVMList(0)
|
||||||
|
Else
|
||||||
|
ParentMachGroupVM.SelPart = Nothing
|
||||||
|
End If
|
||||||
|
ElseIf Index = ParentMachGroupVM.PartVMList.Count - 1 Then
|
||||||
|
If ParentMachGroupVM.PartVMList.Count > 1 Then
|
||||||
|
ParentMachGroupVM.SelPart = ParentMachGroupVM.PartVMList(ParentMachGroupVM.PartVMList.Count - 2)
|
||||||
|
Else
|
||||||
|
ParentMachGroupVM.SelPart = Nothing
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ParentMachGroupVM.SelPart = ParentMachGroupVM.PartVMList(Index - 1)
|
||||||
|
End If
|
||||||
|
ParentMachGroupVM.PartVMList.Remove(Me)
|
||||||
|
' aggiorno contatore pezzi usati in Prod
|
||||||
|
If Not IsNothing(BTLPart) Then BTLPart.RefreshPartInProd()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Function RetrieveBTLPartFromPart() As BTLPartVM
|
||||||
|
Dim BTLPartId As Integer = EgtDuploGetOriginal(nPartId)
|
||||||
|
Return Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = BTLPartId)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region ' DeletePart
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub OnBTLFeatureAdded(sender As Object, e As BTLFeatureAddedEventArgs)
|
||||||
|
Dim BTLFeatureVM As BTLFeatureVM = New BTLFeatureVM(e.NewBTLFeature)
|
||||||
|
FeatureVMList.Add(BTLFeatureVM)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnBTLFeatureVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||||
|
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||||
|
For Each BTLFeatureVM As BTLFeatureVM In e.NewItems
|
||||||
|
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||||
|
For Each BTLFeatureVM As BTLFeatureVM In e.OldItems
|
||||||
|
RemoveHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnBTLFeatureVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
|
'Select Case e.PropertyName
|
||||||
|
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
||||||
|
'End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -7,18 +7,42 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class WallMachGroupVM
|
Public Class WallMachGroupVM
|
||||||
Inherits Core.WallMachGroupVM
|
Inherits MyMachGroupVM
|
||||||
|
|
||||||
|
Public ReadOnly Property m_WallMachGroupM As WallMachGroupM
|
||||||
|
Get
|
||||||
|
Return m_MachGroupM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "CONSTRUCTORS"
|
#Region "CONSTRUCTORS"
|
||||||
|
|
||||||
Sub New(WallMachGroupM As WallMachGroupM)
|
Sub New(WallMachGroupM As WallMachGroupM)
|
||||||
MyBase.New(WallMachGroupM)
|
MyBase.New(WallMachGroupM)
|
||||||
|
AddHandler m_WallMachGroupM.PartAdded, AddressOf OnWallAdded
|
||||||
|
AddHandler m_WallMachGroupM.PartRemoved, AddressOf OnWallRemoved
|
||||||
|
CreateWallVMList()
|
||||||
|
' Aggiorno stato da stati feature
|
||||||
|
CalcGlobalUpdate()
|
||||||
|
NotifyPropertyChanged(NameOf(CALC_FALL_Visibility))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTORS
|
#End Region ' CONSTRUCTORS
|
||||||
|
|
||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Private Sub CreateWallVMList()
|
||||||
|
Dim all As List(Of WallVM) = (From WallM In m_WallMachGroupM.GetParts()
|
||||||
|
Select New WallVM(WallM, Me)).ToList()
|
||||||
|
|
||||||
|
For Each WallVM As WallVM In all
|
||||||
|
AddHandler WallVM.PropertyChanged, AddressOf OnWallVMPropertyChanged
|
||||||
|
Next
|
||||||
|
|
||||||
|
m_PartVMList = New ObservableCollection(Of PartVM)(all)
|
||||||
|
AddHandler m_PartVMList.CollectionChanged, AddressOf OnWallVMListChanged
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Function ReDrawWallMachgroup() As Boolean
|
Friend Function ReDrawWallMachgroup() As Boolean
|
||||||
' scrivo dati di tutti i pezzi
|
' scrivo dati di tutti i pezzi
|
||||||
Dim nIndex As Integer
|
Dim nIndex As Integer
|
||||||
@@ -44,7 +68,10 @@ Public Class WallMachGroupVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Overrides Function Copy() As MyMachGroupVM
|
Friend Overrides Function Copy() As MyMachGroupVM
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -66,6 +93,7 @@ Public Class WallMachGroupVM
|
|||||||
NotifyPropertyChanged(NameOf(dWaste))
|
NotifyPropertyChanged(NameOf(dWaste))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "DeleteMachGroup"
|
#Region "DeleteMachGroup"
|
||||||
@@ -77,7 +105,8 @@ Public Class WallMachGroupVM
|
|||||||
Dim nWallId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
Dim nWallId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
|
||||||
While nWallId <> GDB_ID.NULL
|
While nWallId <> GDB_ID.NULL
|
||||||
If EgtRemovePartFromRawPart(nWallId) Then
|
If EgtRemovePartFromRawPart(nWallId) Then
|
||||||
Dim BTLPart As BTLPartVM = BTLPartVM.RetrieveBTLPartFromPart(nWallId)
|
Dim Part As PartVM = PartVMList.FirstOrDefault(Function(x) x.nPartId = nWallId)
|
||||||
|
Dim BTLPart As BTLPartVM = Part.RetrieveBTLPartFromPart()
|
||||||
EgtErase(nWallId)
|
EgtErase(nWallId)
|
||||||
If Not IsNothing(BTLPart) Then BTLPart.RefreshPartInProd()
|
If Not IsNothing(BTLPart) Then BTLPart.RefreshPartInProd()
|
||||||
End If
|
End If
|
||||||
@@ -111,4 +140,36 @@ Public Class WallMachGroupVM
|
|||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
#Region "EVENTS"
|
||||||
|
|
||||||
|
Private Sub OnWallAdded(sender As Object, e As PartAddedEventArgs)
|
||||||
|
Dim WallVM As WallVM = New WallVM(e.NewPart, Me)
|
||||||
|
PartVMList.Add(WallVM)
|
||||||
|
End Sub
|
||||||
|
Private Sub OnWallRemoved(sender As Object, e As PartAddedEventArgs)
|
||||||
|
Dim WallVM As WallVM = PartVMList.FirstOrDefault(Function(x) x.PartM Is e.m_NewPart)
|
||||||
|
If Not IsNothing(WallVM) Then PartVMList.Remove(WallVM)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnWallVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||||
|
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
|
||||||
|
For Each WallVM As WallVM In e.NewItems
|
||||||
|
AddHandler WallVM.PropertyChanged, AddressOf OnWallVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
|
||||||
|
For Each WallVM As WallVM In e.OldItems
|
||||||
|
RemoveHandler WallVM.PropertyChanged, AddressOf OnWallVMPropertyChanged
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnWallVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||||
|
'Select Case e.PropertyName
|
||||||
|
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
||||||
|
'End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -5,7 +5,13 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class WallVM
|
Public Class WallVM
|
||||||
Inherits Core.WallVM
|
Inherits PartVM
|
||||||
|
|
||||||
|
Public ReadOnly Property m_WallM As WallM
|
||||||
|
Get
|
||||||
|
Return m_PartM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Overrides Property sPOSX As String
|
Public Overrides Property sPOSX As String
|
||||||
Get
|
Get
|
||||||
@@ -29,7 +35,7 @@ Public Class WallVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Overrides Property sPOSY As String
|
Public Property sPOSY As String
|
||||||
Get
|
Get
|
||||||
Return LenToString(m_WallM.dPOSY, 3)
|
Return LenToString(m_WallM.dPOSY, 3)
|
||||||
End Get
|
End Get
|
||||||
@@ -51,7 +57,16 @@ Public Class WallVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Overrides Property bFLIP As Boolean
|
Public Property sROT As String
|
||||||
|
Get
|
||||||
|
Return LenToString(m_WallM.dROT, 3) & "°"
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
StringToLen(value, m_WallM.dROT)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property bFLIP As Boolean
|
||||||
Get
|
Get
|
||||||
Return m_WallM.bFLIP
|
Return m_WallM.bFLIP
|
||||||
End Get
|
End Get
|
||||||
@@ -95,7 +110,7 @@ Public Class WallVM
|
|||||||
' elimino pezzo copia
|
' elimino pezzo copia
|
||||||
EgtRemovePartFromRawPart(Me.nPartId)
|
EgtRemovePartFromRawPart(Me.nPartId)
|
||||||
' Recupero Id BTLPart originale
|
' Recupero Id BTLPart originale
|
||||||
Dim BTLPart As BTLPartVM = BTLPartVM.RetrieveBTLPartFromPart(nPartId)
|
Dim BTLPart As BTLPartVM = RetrieveBTLPartFromPart()
|
||||||
EgtErase(Me.nPartId)
|
EgtErase(Me.nPartId)
|
||||||
' rimuovo dalla lista pezzi
|
' rimuovo dalla lista pezzi
|
||||||
Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(ParentMachGroupVM.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
|
Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(ParentMachGroupVM.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
|
||||||
|
|||||||
@@ -5,20 +5,30 @@ Imports EgtUILib
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class MachinePanelVM
|
Public Class MachinePanelVM
|
||||||
Inherits EgtWPFLib5.MachinePanelVM
|
Inherits VMBase
|
||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
' Radice del direttorio delle macchine
|
' Radice del direttorio delle macchine
|
||||||
Private m_sMachinesRoot As String
|
Private m_sMachinesRoot As String
|
||||||
|
|
||||||
|
' Lista delle macchine disponibili
|
||||||
|
Private m_MachineList As New ObservableCollection(Of Machine)
|
||||||
|
Public Property MachineList As ObservableCollection(Of Machine)
|
||||||
|
Get
|
||||||
|
Return m_MachineList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of Machine))
|
||||||
|
m_MachineList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
' Macchina correntemente selezionata e quindi attiva
|
' Macchina correntemente selezionata e quindi attiva
|
||||||
Private m_SelectedMachine As Machine = Nothing
|
Private m_SelectedMachine As Machine = Nothing
|
||||||
Public Overrides Property SelectedMachine As Machine
|
Public Property SelectedMachine As MyMachine
|
||||||
Get
|
Get
|
||||||
Return m_SelectedMachine
|
Return m_SelectedMachine
|
||||||
End Get
|
End Get
|
||||||
Set(value As Machine)
|
Set(value As MyMachine)
|
||||||
If value IsNot m_SelectedMachine Then
|
If value IsNot m_SelectedMachine Then
|
||||||
' se sono in modalità disegno
|
' se sono in modalità disegno
|
||||||
If Map.refMainMenuVM.SelPage = Pages.CONFIG Then
|
If Map.refMainMenuVM.SelPage = Pages.CONFIG Then
|
||||||
@@ -45,6 +55,7 @@ Public Class MachinePanelVM
|
|||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(BeamTable_Visibility))
|
NotifyPropertyChanged(NameOf(BeamTable_Visibility))
|
||||||
NotifyPropertyChanged(NameOf(WallTable_Visibility))
|
NotifyPropertyChanged(NameOf(WallTable_Visibility))
|
||||||
|
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.MovePart_Visibility))
|
||||||
' resetto Proj e Prod correnti, BTLStructure e MachGroupPanel
|
' resetto Proj e Prod correnti, BTLStructure e MachGroupPanel
|
||||||
Map.refProjManagerVM.ResetCurrProj()
|
Map.refProjManagerVM.ResetCurrProj()
|
||||||
Map.refProdManagerVM.ResetCurrProd()
|
Map.refProdManagerVM.ResetCurrProd()
|
||||||
@@ -59,6 +70,17 @@ Public Class MachinePanelVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_SetUp_Background As Brush = New BrushConverter().ConvertFrom("#FFDDDDDD")
|
||||||
|
Public Property SetUp_Background As Brush
|
||||||
|
Get
|
||||||
|
Return m_SetUp_Background
|
||||||
|
End Get
|
||||||
|
Set(value As Brush)
|
||||||
|
m_SetUp_Background = value
|
||||||
|
NotifyPropertyChanged("SetUp_Background")
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_MachPanel_IsEnabled As Boolean = True
|
Private m_MachPanel_IsEnabled As Boolean = True
|
||||||
Public Property MachPanel_IsEnabled As Boolean
|
Public Property MachPanel_IsEnabled As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -125,6 +147,10 @@ Public Class MachinePanelVM
|
|||||||
#End Region ' ToolTip
|
#End Region ' ToolTip
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
|
Private m_cmdToolDb As ICommand
|
||||||
|
Private m_cmdMachDb As ICommand
|
||||||
|
Private m_cmdSetUp As ICommand
|
||||||
|
Private m_cmdMachOptions As ICommand
|
||||||
Private m_cmdBeamTable As ICommand
|
Private m_cmdBeamTable As ICommand
|
||||||
Private m_cmdWallTable As ICommand
|
Private m_cmdWallTable As ICommand
|
||||||
|
|
||||||
@@ -146,7 +172,7 @@ Public Class MachinePanelVM
|
|||||||
#Region "METHODS"
|
#Region "METHODS"
|
||||||
|
|
||||||
Friend Sub LoadCurrentMachine()
|
Friend Sub LoadCurrentMachine()
|
||||||
If MachineList.Count = 0 Then Return
|
If m_MachineList.Count = 0 Then Return
|
||||||
Dim CurrMach As String = String.Empty
|
Dim CurrMach As String = String.Empty
|
||||||
GetMainPrivateProfileString(S_MACH, K_CURRMACH, String.Empty, CurrMach)
|
GetMainPrivateProfileString(S_MACH, K_CURRMACH, String.Empty, CurrMach)
|
||||||
Dim bFound As Boolean = False
|
Dim bFound As Boolean = False
|
||||||
@@ -226,7 +252,28 @@ Public Class MachinePanelVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Overrides Sub ToolDb(ByVal param As Object)
|
#End Region
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "ToolDbCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Exec.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property ToolDbCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdToolDb Is Nothing Then
|
||||||
|
m_cmdToolDb = New Command(AddressOf ToolDb)
|
||||||
|
End If
|
||||||
|
Return m_cmdToolDb
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub ToolDb(ByVal param As Object)
|
||||||
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
|
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
|
||||||
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
|
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
|
||||||
If Not EgtTdbReload() Then
|
If Not EgtTdbReload() Then
|
||||||
@@ -247,7 +294,26 @@ Public Class MachinePanelVM
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub MachDb(ByVal param As Object)
|
#End Region ' ToolDbCommand
|
||||||
|
|
||||||
|
#Region "MachDbCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Exec.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property MachDbCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdMachDb Is Nothing Then
|
||||||
|
m_cmdMachDb = New Command(AddressOf MachDb)
|
||||||
|
End If
|
||||||
|
Return m_cmdMachDb
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub MachDb(ByVal param As Object)
|
||||||
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
|
If Not VerifyMachinesDir(m_sMachinesRoot) Then Return
|
||||||
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
|
' ricarico il database per intercettare eventuali aggiornamenti fatti da altre istanze del programma (se la cartella Machines è condivisa)
|
||||||
If Not EgtMdbReload() Then
|
If Not EgtMdbReload() Then
|
||||||
@@ -268,7 +334,26 @@ Public Class MachinePanelVM
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub SetUp(ByVal param As Object)
|
#End Region ' MachDbCommand
|
||||||
|
|
||||||
|
#Region "SetUpCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Exec.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property SetUpCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdSetUp Is Nothing Then
|
||||||
|
m_cmdSetUp = New Command(AddressOf SetUp)
|
||||||
|
End If
|
||||||
|
Return m_cmdSetUp
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub SetUp(ByVal param As Object)
|
||||||
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
|
' verifico che il file di configurazione attrezzaggio (lua) della macchina esista
|
||||||
If Not File.Exists(CurrentMachine.sMachDir & "\Scripts\" & SETUP_LUA) Then
|
If Not File.Exists(CurrentMachine.sMachDir & "\Scripts\" & SETUP_LUA) Then
|
||||||
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
|
EgtOutLog("SetUp error: SetUp configuration file doesn't exist ")
|
||||||
@@ -307,9 +392,30 @@ Public Class MachinePanelVM
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region ' SetUpCommand
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "MachOptionsCommand"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Returns a command that do Exec.
|
||||||
|
''' </summary>
|
||||||
|
Public ReadOnly Property MachOptionsCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdMachOptions Is Nothing Then
|
||||||
|
m_cmdMachOptions = New Command(AddressOf MachOptions)
|
||||||
|
End If
|
||||||
|
Return m_cmdMachOptions
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub MachOptions(ByVal param As Object)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' MachOptionsCommand
|
||||||
|
|
||||||
#Region "BeamTable"
|
#Region "BeamTable"
|
||||||
|
|
||||||
@@ -341,7 +447,7 @@ Public Class MachinePanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region ' WallTable
|
#End Region ' BeamTable
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|||||||
@@ -158,13 +158,6 @@ Public Class MainMenuVM
|
|||||||
If Not IsNothing(Map.refProjManagerVM.CurrProj) Then
|
If Not IsNothing(Map.refProjManagerVM.CurrProj) Then
|
||||||
If IsNothing(Map.refProjManagerVM.CurrProj) OrElse Map.refProjManagerVM.CurrProj.bReloadProject Then
|
If IsNothing(Map.refProjManagerVM.CurrProj) OrElse Map.refProjManagerVM.CurrProj.bReloadProject Then
|
||||||
Map.refProjManagerVM.OpenProject(Map.refProjManagerVM.CurrProj)
|
Map.refProjManagerVM.OpenProject(Map.refProjManagerVM.CurrProj)
|
||||||
' aggiorno le colonne in base al tipo progetto
|
|
||||||
Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
|
||||||
Map.refPartInRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
|
||||||
DbControllers.m_ProjController.LockByProjId(Map.refProjManagerVM.CurrProj.nProjId, True)
|
|
||||||
' aggiorno titolo
|
|
||||||
Map.refMainWindowVM.UpdateTitle()
|
|
||||||
Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
|
||||||
Else
|
Else
|
||||||
' verifico se il prod di provenienza ha piu' proj
|
' verifico se il prod di provenienza ha piu' proj
|
||||||
If Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso Map.refProdManagerVM.CurrProd.nProjIdList.Count > 1 Then
|
If Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso Map.refProdManagerVM.CurrProd.nProjIdList.Count > 1 Then
|
||||||
@@ -222,15 +215,7 @@ Public Class MainMenuVM
|
|||||||
If File.Exists(Map.refProdManagerVM.CurrProd.sProdPath) Then
|
If File.Exists(Map.refProdManagerVM.CurrProd.sProdPath) Then
|
||||||
' apro progetto
|
' apro progetto
|
||||||
If Map.refProdManagerVM.CurrProd.bReloadProject Then
|
If Map.refProdManagerVM.CurrProd.bReloadProject Then
|
||||||
If Map.refSceneHostVM.MainController.OpenProject(Map.refProdManagerVM.CurrProd.sProdPath, False) Then
|
Map.refSceneHostVM.MainController.OpenProject(Map.refProdManagerVM.CurrProd.sProdPath, False)
|
||||||
' aggiorno le colonne in base al tipo progetto
|
|
||||||
Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
|
||||||
Map.refPartInRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
|
||||||
DbControllers.m_ProdController.LockByProdId(Map.refProdManagerVM.CurrProd.nProdId, True)
|
|
||||||
' aggiorno titolo
|
|
||||||
Map.refMainWindowVM.UpdateTitle()
|
|
||||||
Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
' mostro tutti i pezzi
|
' mostro tutti i pezzi
|
||||||
Map.refShowBeamPanelVM.ShowAll( False)
|
Map.refShowBeamPanelVM.ShowAll( False)
|
||||||
@@ -257,7 +242,6 @@ Public Class MainMenuVM
|
|||||||
End If
|
End If
|
||||||
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
|
||||||
Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility))
|
Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility))
|
||||||
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.MovePart_Visibility))
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -180,8 +180,6 @@ Public Class MainWindowM
|
|||||||
IniFile.m_sIniFile = m_sConfigDir & "\" & INI_FILE_NAME
|
IniFile.m_sIniFile = m_sConfigDir & "\" & INI_FILE_NAME
|
||||||
' Impostazione path BTL Ini File
|
' Impostazione path BTL Ini File
|
||||||
BTLIniFile.m_sBTLIniFile = m_sConfigDir & "\" & BTLFEATURES_FILE_NAME
|
BTLIniFile.m_sBTLIniFile = m_sConfigDir & "\" & BTLFEATURES_FILE_NAME
|
||||||
' Impostazione path Ini file DataGrid
|
|
||||||
DataGridColumnsIniFile.m_sDataGridColumnsIniFile = m_sConfigDir & "\" & DATAGRIDCOLUMNS_FILE_NAME
|
|
||||||
' Impostazione path resources dir
|
' Impostazione path resources dir
|
||||||
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
||||||
' Impostazione direttorio per le macchine
|
' Impostazione direttorio per le macchine
|
||||||
@@ -200,8 +198,6 @@ Public Class MainWindowM
|
|||||||
m_sWallRoot = m_sDataRoot & "\" & WALL_DIR
|
m_sWallRoot = m_sDataRoot & "\" & WALL_DIR
|
||||||
End If
|
End If
|
||||||
m_sWarehouseRoot = m_sDataRoot & "\" & WAREHOUSE_DIR
|
m_sWarehouseRoot = m_sDataRoot & "\" & WAREHOUSE_DIR
|
||||||
' imposto cartelle dei progetti
|
|
||||||
Core.ProjectFileVM.Init(sProjsDir, sProdsDir)
|
|
||||||
' Verifico indice di istanza
|
' Verifico indice di istanza
|
||||||
ManageInstance()
|
ManageInstance()
|
||||||
' Imposto tipo di chiave
|
' Imposto tipo di chiave
|
||||||
|
|||||||
@@ -61,7 +61,10 @@
|
|||||||
SelectedItem="{Binding SelProject}"
|
SelectedItem="{Binding SelProject}"
|
||||||
CanUserAddRows="False"
|
CanUserAddRows="False"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
|
CanUserSortColumns="True"
|
||||||
|
CanUserResizeColumns="True"
|
||||||
CanUserResizeRows="False"
|
CanUserResizeRows="False"
|
||||||
|
CanUserReorderColumns="True"
|
||||||
SelectionMode="Single"
|
SelectionMode="Single"
|
||||||
ScrollViewer.CanContentScroll="True"
|
ScrollViewer.CanContentScroll="True"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
@@ -70,7 +73,9 @@
|
|||||||
BindingColumns="{Binding ProjectColumns}">
|
BindingColumns="{Binding ProjectColumns}">
|
||||||
<DataGrid.Resources>
|
<DataGrid.Resources>
|
||||||
<!-- ProjId -->
|
<!-- ProjId -->
|
||||||
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}">
|
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||||
@@ -78,7 +83,9 @@
|
|||||||
</DataGridTextColumn.HeaderTemplate>
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!-- ProdId -->
|
<!-- ProdId -->
|
||||||
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
|
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||||
@@ -86,7 +93,9 @@
|
|||||||
</DataGridTextColumn.HeaderTemplate>
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!-- BTL FileName -->
|
<!-- BTL FileName -->
|
||||||
<DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}">
|
<DataGridTextColumn x:Key="colBTLNAME" Binding="{Binding sBTLFileName}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.BTLFileName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||||
@@ -94,7 +103,9 @@
|
|||||||
</DataGridTextColumn.HeaderTemplate>
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!-- ListName -->
|
<!-- ListName -->
|
||||||
<DataGridTextColumn x:Key="colLISTNAME" Binding="{Binding sListName}">
|
<DataGridTextColumn x:Key="colLISTNAME" Binding="{Binding sListName}"
|
||||||
|
Width="1*"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.ListName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.ListName_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||||
@@ -102,7 +113,9 @@
|
|||||||
</DataGridTextColumn.HeaderTemplate>
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!-- Exported date -->
|
<!-- Exported date -->
|
||||||
<DataGridTextColumn x:Key="colEXPDATE" Binding="{Binding dtExportDate}">
|
<DataGridTextColumn x:Key="colEXPDATE" Binding="{Binding dtExportDate}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
<DataGridTextColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.ExportDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.ExportDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||||
@@ -110,13 +123,17 @@
|
|||||||
</DataGridTextColumn.HeaderTemplate>
|
</DataGridTextColumn.HeaderTemplate>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!-- Creation date -->
|
<!-- Creation date -->
|
||||||
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
|
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.CreateDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.CreateDate_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<!-- Name (per Prod) -->
|
<!-- Name (per Prod) -->
|
||||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}"
|
||||||
|
Width="Auto"
|
||||||
|
IsReadOnly="True">
|
||||||
<DataGridTextColumn.Header>
|
<DataGridTextColumn.Header>
|
||||||
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||||
</DataGridTextColumn.Header>
|
</DataGridTextColumn.Header>
|
||||||
|
|||||||
@@ -10,18 +10,20 @@ Public Class OpenProjectFileDialogVM
|
|||||||
|
|
||||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
Private m_ProjectColumns As New ObservableCollection(Of EgtDataGridColumn)
|
Private m_ProjectColumns As New ObservableCollection(Of String)
|
||||||
Public Property ProjectColumns As ObservableCollection(Of EgtDataGridColumn)
|
Public Property ProjectColumns As ObservableCollection(Of String)
|
||||||
Get
|
Get
|
||||||
Return m_ProjectColumns
|
Return m_ProjectColumns
|
||||||
End Get
|
End Get
|
||||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
Set(value As ObservableCollection(Of String))
|
||||||
m_ProjectColumns = value
|
m_ProjectColumns = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_ProjectType As ProjectType
|
Private m_ProjectType As ProjectType
|
||||||
|
|
||||||
|
Private m_FileNameTxBl As TextBlock
|
||||||
|
|
||||||
Private m_sFilter As String
|
Private m_sFilter As String
|
||||||
Public Property Filter As String
|
Public Property Filter As String
|
||||||
Get
|
Get
|
||||||
@@ -268,8 +270,11 @@ Public Class OpenProjectFileDialogVM
|
|||||||
|
|
||||||
Private Sub LoadColumns(ProjectType As ProjectType)
|
Private Sub LoadColumns(ProjectType As ProjectType)
|
||||||
If ProjectType = ProjectType.PROJ Then
|
If ProjectType = ProjectType.PROJ Then
|
||||||
' carico le colonne della datagrid
|
ProjectColumns.Add("colPROJID")
|
||||||
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROJ, ProjectColumns)
|
ProjectColumns.Add("colBTLNAME")
|
||||||
|
ProjectColumns.Add("colLISTNAME")
|
||||||
|
ProjectColumns.Add("colEXPDATE")
|
||||||
|
ProjectColumns.Add("colCRTDATE")
|
||||||
' carico campi su cui eseguire il filtro di ricerca
|
' carico campi su cui eseguire il filtro di ricerca
|
||||||
m_SearchColumnList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(OpenProjFileColumn.NULL, ""),
|
m_SearchColumnList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(OpenProjFileColumn.NULL, ""),
|
||||||
New IdNameStruct(OpenProjFileColumn.ID, Id_Msg),
|
New IdNameStruct(OpenProjFileColumn.ID, Id_Msg),
|
||||||
@@ -278,8 +283,9 @@ Public Class OpenProjectFileDialogVM
|
|||||||
New IdNameStruct(OpenProjFileColumn.EXPORTDATE, ExportDate_Msg),
|
New IdNameStruct(OpenProjFileColumn.EXPORTDATE, ExportDate_Msg),
|
||||||
New IdNameStruct(OpenProjFileColumn.CREATEDATE, CreateDate_Msg)})
|
New IdNameStruct(OpenProjFileColumn.CREATEDATE, CreateDate_Msg)})
|
||||||
ElseIf ProjectType = ProjectType.PROD Then
|
ElseIf ProjectType = ProjectType.PROD Then
|
||||||
' carico le colonne della datagrid
|
ProjectColumns.Add("colPRODID")
|
||||||
GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROD, ProjectColumns)
|
ProjectColumns.Add("colBTLNAME")
|
||||||
|
ProjectColumns.Add("colCRTDATE")
|
||||||
' carico campi su cui eseguire il filtro di ricerca
|
' carico campi su cui eseguire il filtro di ricerca
|
||||||
m_SearchColumnList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(OpenProjFileColumn.NULL, ""),
|
m_SearchColumnList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(OpenProjFileColumn.NULL, ""),
|
||||||
New IdNameStruct(OpenProjFileColumn.ID, Id_Msg),
|
New IdNameStruct(OpenProjFileColumn.ID, Id_Msg),
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,278 @@
|
|||||||
|
Imports System.IO
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class ProjectFile
|
||||||
|
|
||||||
|
Private m_nProjectType As ProjectType
|
||||||
|
Public ReadOnly Property nProjectType As ProjectType
|
||||||
|
Get
|
||||||
|
Return m_nProjectType
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetProjectType(nProjectType As ProjectType)
|
||||||
|
m_nProjectType = nProjectType
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_nProjId As Integer = 0
|
||||||
|
Public ReadOnly Property nProjId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nProjId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property sProjDirPath As String
|
||||||
|
Get
|
||||||
|
If IsNothing(m_nProjId) OrElse m_nProjId = 0 Then Return String.Empty
|
||||||
|
Return refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend ReadOnly Property sProjPath As String
|
||||||
|
Get
|
||||||
|
Dim sPath As String = String.Empty
|
||||||
|
If IsNothing(m_nProjId) OrElse m_nProjId = 0 Then Return String.Empty
|
||||||
|
sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR
|
||||||
|
If Not IsNothing(m_nProdId) AndAlso m_nProdId > 0 Then
|
||||||
|
sPath &= nProdId.ToString("0000")
|
||||||
|
End If
|
||||||
|
sPath &= FILENAMESEPARATOR & BTLFileName & ".nge"
|
||||||
|
Return sPath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_nProdId As Integer = 0
|
||||||
|
Public ReadOnly Property nProdId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nProdId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend ReadOnly Property sProdDirPath As String
|
||||||
|
Get
|
||||||
|
Dim sPath As String = String.Empty
|
||||||
|
If IsNothing(m_nProdId) OrElse m_nProdId = 0 Then Return String.Empty
|
||||||
|
Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend ReadOnly Property sProdPath As String
|
||||||
|
Get
|
||||||
|
Dim sPath As String = String.Empty
|
||||||
|
If IsNothing(m_nProdId) OrElse m_nProdId = 0 Then Return String.Empty
|
||||||
|
Return refMainWindowVM.MainWindowM.sProdsDir & "\" & nProdId.ToString("0000") & "\" & nProdId.ToString("0000") & ".nge"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_BTLFileName As String = String.Empty
|
||||||
|
Public ReadOnly Property BTLFileName As String
|
||||||
|
Get
|
||||||
|
Return m_BTLFileName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_NewProj As Boolean
|
||||||
|
Friend Property NewProj As Boolean
|
||||||
|
Get
|
||||||
|
Return m_NewProj
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_NewProj = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_NewProd As Boolean
|
||||||
|
Friend Property NewProd As Boolean
|
||||||
|
Get
|
||||||
|
Return m_NewProd
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
m_NewProd = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
' nome del file mostrato nella finestra OpenProjFileDialog
|
||||||
|
Public ReadOnly Property OpenFileName As String
|
||||||
|
Get
|
||||||
|
If m_nProjectType = ProjectType.PROJ Then
|
||||||
|
Return m_nProjId.ToString("0000") & " " & BTLFileName
|
||||||
|
ElseIf m_nProjectType = ProjectType.PROD Then
|
||||||
|
Return m_nProdId.ToString("0000")
|
||||||
|
Else
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(nProjectType As ProjectType, ProjectFileName As String)
|
||||||
|
m_nProjectType = nProjectType
|
||||||
|
If m_nProjectType = ProjectType.PROJ Then
|
||||||
|
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(0), m_nProjId)
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(1), m_nProdId)
|
||||||
|
Else
|
||||||
|
m_nProdId = 0
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||||
|
m_BTLFileName = DataFromFileName(2)
|
||||||
|
End If
|
||||||
|
ElseIf m_nProjectType = ProjectType.PROD Then
|
||||||
|
Integer.TryParse(ProjectFileName, m_nProdId)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(nProjectType As ProjectType, nProjId As Integer, nProdId As Integer, sBTLFileName As String)
|
||||||
|
m_nProjectType = nProjectType
|
||||||
|
If m_nProjectType = ProjectType.PROJ Then
|
||||||
|
m_nProjId = nProjId
|
||||||
|
m_nProdId = nProdId
|
||||||
|
m_BTLFileName = sBTLFileName
|
||||||
|
ElseIf m_nProjectType = ProjectType.PROD Then
|
||||||
|
m_nProdId = nProdId
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub SetProdId(nProdId As Integer)
|
||||||
|
' rinomino proj con riferimento a prod
|
||||||
|
Dim OldPath As String = sProjPath
|
||||||
|
m_nProdId = nProdId
|
||||||
|
Dim NewPath As String = sProjPath
|
||||||
|
File.Move(OldPath, NewPath)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub ResetProdId()
|
||||||
|
SetProdId(0)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' funzione che restituisce le parti di nome file
|
||||||
|
Friend Shared Function VerifyProjectFile(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
|
||||||
|
If nProjectType = ProjectType.PROJ Then
|
||||||
|
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||||
|
If DataFromFileName.Count = 3 Then
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(0), nProjId)
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(1), nProdId)
|
||||||
|
Else
|
||||||
|
nProdId = 0
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||||
|
sBTLFileName = DataFromFileName(2)
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
ElseIf nProjectType = ProjectType.PROD Then
|
||||||
|
Return Integer.TryParse(ProjectFileName, nProdId)
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' funzione che dato un nome file e il tipo restituisce il corretto numero di progetto
|
||||||
|
Friend Shared Function GetProjectNumber(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
|
||||||
|
If String.IsNullOrWhiteSpace(ProjectFileName) Then
|
||||||
|
nProjId = 0
|
||||||
|
nProdId = 0
|
||||||
|
sBTLFileName = ""
|
||||||
|
Return False
|
||||||
|
ElseIf ProjectFileName.Contains(FILENAMESEPARATOR) Then
|
||||||
|
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||||
|
If DataFromFileName.Count = 3 Then
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(0), nProjId)
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(1), nProdId)
|
||||||
|
Else
|
||||||
|
nProdId = 0
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||||
|
sBTLFileName = DataFromFileName(2)
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
ElseIf nProjectType = ProjectType.PROJ Then
|
||||||
|
Dim ProjectFileNameProd As String = Integer.TryParse(ProjectFileName, nProdId)
|
||||||
|
Dim nTempProjId As Integer = 0
|
||||||
|
Dim nTempProdId As Integer = 0
|
||||||
|
Dim sTempBTLFileName As String = ""
|
||||||
|
' ricavo lista cartelle proj
|
||||||
|
Dim AllDirsInDir As IEnumerable(Of String) = IO.Directory.EnumerateDirectories(Map.refMainWindowVM.MainWindowM.sProjsDir)
|
||||||
|
For Each Directory In AllDirsInDir
|
||||||
|
Dim AllFilesInDir As IEnumerable(Of String) = IO.Directory.EnumerateFiles(Directory)
|
||||||
|
For Each File In AllFilesInDir
|
||||||
|
If Path.GetExtension(File).ToLower() = ".nge" Then
|
||||||
|
If File.Contains(FILENAMESEPARATOR) Then
|
||||||
|
Dim DataFromFileName As String() = ProjectFileName.Split(FILENAMESEPARATOR)
|
||||||
|
If DataFromFileName.Count = 3 Then
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(0), nTempProjId)
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||||
|
Integer.TryParse(DataFromFileName(1), nTempProdId)
|
||||||
|
Else
|
||||||
|
nProdId = 0
|
||||||
|
End If
|
||||||
|
If Not String.IsNullOrEmpty(DataFromFileName(2)) Then
|
||||||
|
sTempBTLFileName = DataFromFileName(2)
|
||||||
|
End If
|
||||||
|
If ProjectFileNameProd = nTempProdId Then
|
||||||
|
nProjId = nTempProjId
|
||||||
|
nProdId = nTempProdId
|
||||||
|
sTempBTLFileName = sBTLFileName
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Else Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Shared Function VerifyProjectModification(CurrProject As ProjectFile, Type As ProjectType) As Boolean
|
||||||
|
If IsNothing(CurrProject) Then Return False
|
||||||
|
Dim bNewProject As Boolean = False
|
||||||
|
Dim sProjectDirPath As String = ""
|
||||||
|
If Type = ProjectType.PROJ Then
|
||||||
|
bNewProject = CurrProject.NewProj
|
||||||
|
sProjectDirPath = CurrProject.sProjDirPath
|
||||||
|
Else
|
||||||
|
bNewProject = CurrProject.NewProd
|
||||||
|
sProjectDirPath = CurrProject.sProdDirPath
|
||||||
|
End If
|
||||||
|
' verifico se progetto modificato, e chiedo se salvare
|
||||||
|
If (EgtGetModified() Or bNewProject) Then
|
||||||
|
If MessageBox.Show("Salvare le modifiche apportate al progetto?", "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||||
|
' salvo proj
|
||||||
|
If Type = ProjectType.PROJ Then
|
||||||
|
Map.refProjManagerVM.Save()
|
||||||
|
Else
|
||||||
|
Map.refProdManagerVM.Save()
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
' se da non salvare e nuovo proj
|
||||||
|
If bNewProject Then
|
||||||
|
' lo elimino
|
||||||
|
Directory.Delete(sProjectDirPath, True)
|
||||||
|
If Type = ProjectType.PROD AndAlso CurrProject.m_nProdId = Map.refProjManagerVM.CurrProj.m_nProdId Then
|
||||||
|
' reset prod in path proj
|
||||||
|
Map.refProjManagerVM.CurrProj.ResetProdId()
|
||||||
|
End If
|
||||||
|
CurrProject = Nothing
|
||||||
|
End If
|
||||||
|
EgtResetModified()
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -6,20 +6,17 @@
|
|||||||
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
||||||
|
|
||||||
<Button Style="{StaticResource ToolBar_Button}"
|
<Button Style="{StaticResource ToolBar_Button}"
|
||||||
Command="{Binding ShowAll_Command}"
|
Command="{Binding ShowAll_Command}">
|
||||||
ToolTip="{Binding ShowAll_ToolTip}">
|
|
||||||
<Image Source="/Resources/ShowBeamPanel/ShowAll.png" Stretch="Uniform"/>
|
<Image Source="/Resources/ShowBeamPanel/ShowAll.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<ToggleButton Style="{StaticResource ToolBar_ToggleButton}"
|
<ToggleButton Style="{StaticResource ToolBar_ToggleButton}"
|
||||||
IsChecked="{Binding ShowSolid_IsChecked}"
|
IsChecked="{Binding ShowSolid_IsChecked}"
|
||||||
IsEnabled="{Binding ShowSolid_IsEnabled}"
|
IsEnabled="{Binding ShowSolid_IsEnabled}">
|
||||||
ToolTip="{Binding ShowSolid_ToolTip}">
|
|
||||||
<Image Source="/Resources/ShowBeamPanel/ShowSolid.png" Stretch="Uniform"/>
|
<Image Source="/Resources/ShowBeamPanel/ShowSolid.png" Stretch="Uniform"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Style="{StaticResource ToolBar_ToggleButton}"
|
<ToggleButton Style="{StaticResource ToolBar_ToggleButton}"
|
||||||
IsChecked="{Binding ShowBuilding_IsChecked}"
|
IsChecked="{Binding ShowBuilding_IsChecked}"
|
||||||
IsEnabled="{Binding ShowBuilding_IsEnabled}"
|
IsEnabled="{Binding ShowBuilding_IsEnabled}">
|
||||||
ToolTip="{Binding ShowBuilding_ToolTip}">
|
|
||||||
<Image Source="/Resources/ShowBeamPanel/ShowBuilding.png" Stretch="Uniform"/>
|
<Image Source="/Resources/ShowBeamPanel/ShowBuilding.png" Stretch="Uniform"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
|
|||||||
@@ -7,21 +7,27 @@ Public Class ShowBeamPanelVM
|
|||||||
|
|
||||||
#Region "ToolTip"
|
#Region "ToolTip"
|
||||||
|
|
||||||
Public ReadOnly Property ShowAll_ToolTip As String
|
Public ReadOnly Property RenderingWFToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(61925)
|
Return EgtMsg(MSG_GRIDVIEWPANEL + 1)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property ShowSolid_ToolTip As String
|
Public ReadOnly Property RenderingHLToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(61926)
|
Return EgtMsg(MSG_GRIDVIEWPANEL + 2)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property ShowBuilding_ToolTip As String
|
Public ReadOnly Property RenderingSHToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(61927)
|
Return EgtMsg(MSG_GRIDVIEWPANEL + 3)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CurveDirToolTip As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(MSG_GRIDVIEWPANEL + 16)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|||||||
@@ -38,11 +38,6 @@
|
|||||||
ToolTip="{Binding ProduceAllRawPart_ToolTip}"
|
ToolTip="{Binding ProduceAllRawPart_ToolTip}"
|
||||||
IsEnabled="{Binding TopPanel_IsEnabled}"
|
IsEnabled="{Binding TopPanel_IsEnabled}"
|
||||||
Style="{StaticResource LeftPanel_SmallButton}"/>
|
Style="{StaticResource LeftPanel_SmallButton}"/>
|
||||||
<Button Content="R"
|
|
||||||
Command="{Binding ResetCALCRawPart_Command}"
|
|
||||||
ToolTip="{Binding ResetCALCRawPart_ToolTip}"
|
|
||||||
IsEnabled="{Binding TopPanel_IsEnabled}"
|
|
||||||
Style="{StaticResource LeftPanel_SmallButton}"/>
|
|
||||||
<Button Content="C"
|
<Button Content="C"
|
||||||
Command="{Binding CopyRawPart_Command}"
|
Command="{Binding CopyRawPart_Command}"
|
||||||
ToolTip="{Binding CopyRawPart_ToolTip}"
|
ToolTip="{Binding CopyRawPart_ToolTip}"
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ Public Class TopPanelVM
|
|||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdProduceAllRawPart As ICommand
|
Private m_cmdProduceAllRawPart As ICommand
|
||||||
Private m_cmdProduceRawPart As ICommand
|
Private m_cmdProduceRawPart As ICommand
|
||||||
Private m_cmdResetCALCRawPart As ICommand
|
|
||||||
Private m_cmdCopyRawPart As ICommand
|
Private m_cmdCopyRawPart As ICommand
|
||||||
Private m_cmdRemoveRawPart As ICommand
|
Private m_cmdRemoveRawPart As ICommand
|
||||||
Private m_cmdRemovePart As ICommand
|
Private m_cmdRemovePart As ICommand
|
||||||
@@ -48,8 +47,8 @@ Public Class TopPanelVM
|
|||||||
|
|
||||||
Public ReadOnly Property MovePart_Visibility As Visibility
|
Public ReadOnly Property MovePart_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
If Not IsNothing(Map.refMachinePanelVM.SelectedMachine) Then
|
||||||
Return If(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM, Visibility.Visible, Visibility.Collapsed)
|
Return If(Map.refMachinePanelVM.SelectedMachine.nType = MachineType.BEAM, Visibility.Visible, Visibility.Collapsed)
|
||||||
End If
|
End If
|
||||||
Return Visibility.Collapsed
|
Return Visibility.Collapsed
|
||||||
End Get
|
End Get
|
||||||
@@ -63,12 +62,6 @@ Public Class TopPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property ResetCALCRawPart_ToolTip As String
|
|
||||||
Get
|
|
||||||
Return EgtMsg(61924)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property ProduceAllRawPart_ToolTip As String
|
Public ReadOnly Property ProduceAllRawPart_ToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(61913)
|
Return EgtMsg(61913)
|
||||||
@@ -190,34 +183,6 @@ Public Class TopPanelVM
|
|||||||
|
|
||||||
#End Region ' ProduceAllRawPart
|
#End Region ' ProduceAllRawPart
|
||||||
|
|
||||||
#Region "ResetCALCRawPart"
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Returns a command that do Exec.
|
|
||||||
''' </summary>
|
|
||||||
Public ReadOnly Property ResetCALCRawPart_Command As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdResetCALCRawPart Is Nothing Then
|
|
||||||
m_cmdResetCALCRawPart = New Command(AddressOf ResetCALCRawPart)
|
|
||||||
End If
|
|
||||||
Return m_cmdResetCALCRawPart
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
||||||
''' </summary>
|
|
||||||
Public Sub ResetCALCRawPart()
|
|
||||||
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
|
|
||||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
|
||||||
If IsNothing(SelMachGroup) Then Return
|
|
||||||
If SelMachGroup.nGlobalState <> CalcStates.NOTCALCULATED Then
|
|
||||||
SelMachGroup.ResetCalcMachGroup()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' ResetCALCRawPart
|
|
||||||
|
|
||||||
#Region "CopyRawPart"
|
#Region "CopyRawPart"
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Friend Module DataGridColumnsIniFile
|
|
||||||
|
|
||||||
Public m_sDataGridColumnsIniFile As String
|
|
||||||
|
|
||||||
Public Function GetPrivateProfileColumns(ParentDGName As String, ByRef ocColumns As ObservableCollection(Of EgtDataGridColumn)) As Boolean
|
|
||||||
Dim colIndex As Integer = 0
|
|
||||||
Dim str = String.Empty
|
|
||||||
While EgtUILib.GetPrivateProfileString(ParentDGName, colIndex, String.Empty, str, m_sDataGridColumnsIniFile) > 0
|
|
||||||
Dim sColumnParams() As String = str.Split(","c)
|
|
||||||
' verifico numero minimo di parametri
|
|
||||||
If sColumnParams.Count >= 7 Then
|
|
||||||
' cancello spazi
|
|
||||||
For index = 0 To sColumnParams.Count - 1
|
|
||||||
sColumnParams(index) = sColumnParams(index).Trim()
|
|
||||||
Next
|
|
||||||
' creo colonna
|
|
||||||
Dim sName = sColumnParams(0)
|
|
||||||
Dim bReorder As Boolean = sColumnParams(1).Equals("1")
|
|
||||||
Dim bResize As Boolean = sColumnParams(2).Equals("1")
|
|
||||||
Dim bSort As Boolean = sColumnParams(3).Equals("1")
|
|
||||||
Dim bIsReadOnly As Boolean = sColumnParams(4).Equals("1")
|
|
||||||
Dim Width As Double
|
|
||||||
Dim WidthType As DataGridLengthUnitType
|
|
||||||
StringToDouble(sColumnParams(5), Width)
|
|
||||||
Integer.TryParse(sColumnParams(6), WidthType)
|
|
||||||
ocColumns.Add(New EgtDataGridColumn(ParentDGName, sName, bReorder, bResize, bSort, bIsReadOnly, New DataGridLength(Width, WidthType)))
|
|
||||||
End If
|
|
||||||
colIndex += 1
|
|
||||||
End While
|
|
||||||
Return ocColumns.Count > 0
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function WriteColumnPrivateProfileParam(ParentDataGridName As String, DisplayIndex As String, sColumnParams As String) As Boolean
|
|
||||||
Return WritePrivateProfileString(ParentDataGridName, DisplayIndex, sColumnParams, m_sDataGridColumnsIniFile)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Module
|
|
||||||
@@ -1,13 +1,6 @@
|
|||||||
<DataGrid x:Class="EgtDataGrid"
|
<DataGrid x:Class="EgtDataGrid"
|
||||||
x:Name="CurrDataGrid"
|
x:Name="CurrDataGrid"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"/>
|
||||||
<DataGrid.ColumnHeaderStyle>
|
|
||||||
<Style TargetType="DataGridColumnHeader">
|
|
||||||
<EventSetter Event="SizeChanged" Handler="Cell_SizedChanged" />
|
|
||||||
</Style>
|
|
||||||
</DataGrid.ColumnHeaderStyle>
|
|
||||||
|
|
||||||
</DataGrid>
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.Collections.Specialized
|
Imports System.Collections.Specialized
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib5
|
|
||||||
|
|
||||||
Public Class EgtDataGrid
|
Public Class EgtDataGrid
|
||||||
|
|
||||||
@@ -9,20 +7,20 @@ Public Class EgtDataGrid
|
|||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Shadows Property BindingColumns As ObservableCollection(Of EgtDataGridColumn)
|
Public Shadows Property BindingColumns As ObservableCollection(Of String)
|
||||||
Get
|
Get
|
||||||
Return CType(MyBase.GetValue(BindingColumnsProperty), ObservableCollection(Of EgtDataGridColumn))
|
Return CType(MyBase.GetValue(BindingColumnsProperty), ObservableCollection(Of String))
|
||||||
End Get
|
End Get
|
||||||
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
Set(value As ObservableCollection(Of String))
|
||||||
MyBase.SetValue(BindingColumnsProperty, value)
|
MyBase.SetValue(BindingColumnsProperty, value)
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Shared ReadOnly BindingColumnsProperty As DependencyProperty = DependencyProperty.Register("BindingColumns", GetType(ObservableCollection(Of EgtDataGridColumn)), GetType(EgtDataGrid), New FrameworkPropertyMetadata(New ObservableCollection(Of EgtDataGridColumn), New PropertyChangedCallback(AddressOf OnDataGridColumnsPropertyChanged)) With {.BindsTwoWayByDefault = True})
|
Public Shared ReadOnly BindingColumnsProperty As DependencyProperty = DependencyProperty.Register("BindingColumns", GetType(ObservableCollection(Of String)), GetType(EgtDataGrid), New FrameworkPropertyMetadata(New ObservableCollection(Of String), New PropertyChangedCallback(AddressOf OnDataGridColumnsPropertyChanged)) With {.BindsTwoWayByDefault = True})
|
||||||
|
|
||||||
Private Shared Sub OnDataGridColumnsPropertyChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
|
Private Shared Sub OnDataGridColumnsPropertyChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
|
||||||
Dim context = TryCast(source, EgtDataGrid)
|
Dim context = TryCast(source, EgtDataGrid)
|
||||||
Dim oldItems = TryCast(e.OldValue, ObservableCollection(Of EgtDataGridColumn))
|
Dim oldItems = TryCast(e.OldValue, ObservableCollection(Of String))
|
||||||
|
|
||||||
If oldItems IsNot Nothing Then
|
If oldItems IsNot Nothing Then
|
||||||
|
|
||||||
@@ -34,13 +32,12 @@ Public Class EgtDataGrid
|
|||||||
RemoveHandler oldItems.CollectionChanged, AddressOf context.collectionChanged
|
RemoveHandler oldItems.CollectionChanged, AddressOf context.collectionChanged
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim newItems = TryCast(e.NewValue, ObservableCollection(Of EgtDataGridColumn))
|
Dim newItems = TryCast(e.NewValue, ObservableCollection(Of String))
|
||||||
|
|
||||||
If newItems IsNot Nothing Then
|
If newItems IsNot Nothing Then
|
||||||
|
|
||||||
For Index = 0 To newItems.Count - 1
|
For Index = 0 To newItems.Count - 1
|
||||||
Dim col As DataGridColumn = context.FindResource(newItems(Index).Name)
|
Dim col As DataGridColumn = context.FindResource(newItems(Index))
|
||||||
newItems(Index).InitColumn(col)
|
|
||||||
context.Columns.Add(col)
|
context.Columns.Add(col)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -54,9 +51,8 @@ Public Class EgtDataGrid
|
|||||||
|
|
||||||
If e.NewItems IsNot Nothing Then
|
If e.NewItems IsNot Nothing Then
|
||||||
|
|
||||||
For Each one As EgtDataGridColumn In e.NewItems
|
For Each one As String In e.NewItems
|
||||||
Dim col As DataGridColumn = CurrDataGrid.FindResource(one.Name)
|
Dim col As DataGridColumn = CurrDataGrid.FindResource(one)
|
||||||
one.InitColumn(col)
|
|
||||||
CurrDataGrid.Columns.Insert(e.NewStartingIndex, col)
|
CurrDataGrid.Columns.Insert(e.NewStartingIndex, col)
|
||||||
If col.DisplayIndex <> e.NewStartingIndex Then
|
If col.DisplayIndex <> e.NewStartingIndex Then
|
||||||
CurrDataGrid.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
|
CurrDataGrid.Columns(e.NewStartingIndex).DisplayIndex = e.NewStartingIndex
|
||||||
@@ -68,8 +64,8 @@ Public Class EgtDataGrid
|
|||||||
|
|
||||||
If e.OldItems IsNot Nothing Then
|
If e.OldItems IsNot Nothing Then
|
||||||
|
|
||||||
For Each one As EgtDataGridColumn In e.OldItems
|
For Each one As String In e.OldItems
|
||||||
Dim col As DataGridColumn = CurrDataGrid.FindResource(one.Name)
|
Dim col As DataGridColumn = CurrDataGrid.FindResource(one)
|
||||||
CurrDataGrid.Columns.Remove(col)
|
CurrDataGrid.Columns.Remove(col)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -95,179 +91,4 @@ Public Class EgtDataGrid
|
|||||||
CurrDataGrid.Columns(e.NewStartingIndex) = col
|
CurrDataGrid.Columns(e.NewStartingIndex) = col
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Cell_SizedChanged(sender As Object, e As SizeChangedEventArgs)
|
|
||||||
' ad ogni ridimensionamento della cella del ColumnHeader salvo le nuove dimensioni nell'ini
|
|
||||||
If Not IsNothing(e.OriginalSource.Column) AndAlso Not IsNothing(BindingColumns(e.OriginalSource.Column.DisplayIndex)) Then
|
|
||||||
BindingColumns(e.OriginalSource.Column.DisplayIndex).SaveDataGridColumn()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public OldIndex As Integer = 0
|
|
||||||
|
|
||||||
Private Sub CurrDataGrid_ColumnReordering(sender As Object, e As DataGridColumnEventArgs) Handles CurrDataGrid.ColumnReordering
|
|
||||||
' conservo il vecchio indice in modo da effettuare lo scambio in BindingColumns una volta riordinate graficamente
|
|
||||||
OldIndex = e.Column.DisplayIndex
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CurrDataGrid_ColumnReordered(sender As Object, e As DataGridColumnEventArgs) Handles CurrDataGrid.ColumnReordered
|
|
||||||
' scambio le colonne in BindingColumns
|
|
||||||
BindingColumns.Move(OldIndex, e.Column.DisplayIndex)
|
|
||||||
' scrivo tutte le colonne interessate dallo spostamento
|
|
||||||
' (se OldIndex > e.Column.DisplayIndex, il ciclo non viene eseguito quindi lo faccio nell'altro senso)
|
|
||||||
For index = OldIndex To e.Column.DisplayIndex
|
|
||||||
BindingColumns(index).SaveDataGridColumn()
|
|
||||||
Next
|
|
||||||
For index = e.Column.DisplayIndex To OldIndex
|
|
||||||
BindingColumns(index).SaveDataGridColumn()
|
|
||||||
Next
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class EgtDataGridColumn
|
|
||||||
|
|
||||||
Private m_dgColumn As DataGridColumn
|
|
||||||
|
|
||||||
Private Property m_ParentDataGridName As String
|
|
||||||
Public Property ParentDataGridName As String
|
|
||||||
Get
|
|
||||||
Return m_ParentDataGridName
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_ParentDataGridName = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property m_Name As String
|
|
||||||
Public Property Name As String
|
|
||||||
Get
|
|
||||||
Return m_Name
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
m_Name = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property m_Width As DataGridLength
|
|
||||||
Public Property Width As DataGridLength
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.Width
|
|
||||||
End Get
|
|
||||||
Set(value As DataGridLength)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.Width = value
|
|
||||||
Else
|
|
||||||
m_Width = value
|
|
||||||
End If
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property m_DisplayIndex As Integer
|
|
||||||
Public Property DisplayIndex As Integer
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.DisplayIndex
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.DisplayIndex = value
|
|
||||||
Else
|
|
||||||
m_DisplayIndex = value
|
|
||||||
End If
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property m_IsReadOnly As Boolean = True
|
|
||||||
Public Property IsReadOnly As Boolean
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.IsReadOnly
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.IsReadOnly = value
|
|
||||||
Else
|
|
||||||
m_IsReadOnly = value
|
|
||||||
End If
|
|
||||||
SaveDataGridColumn()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_CanUserReorder As Boolean
|
|
||||||
Public Property CanUserReorder As Boolean
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.CanUserReorder
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.CanUserReorder = value
|
|
||||||
Else
|
|
||||||
m_CanUserReorder = value
|
|
||||||
End If
|
|
||||||
SaveDataGridColumn()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_CanUserResize As Boolean
|
|
||||||
Public Property CanUserResize As Boolean
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.CanUserResize
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.CanUserResize = value
|
|
||||||
Else
|
|
||||||
m_CanUserResize = value
|
|
||||||
End If
|
|
||||||
SaveDataGridColumn()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_CanUserSort As Boolean
|
|
||||||
Public Property CanUserSort As Boolean
|
|
||||||
Get
|
|
||||||
Return m_dgColumn.CanUserSort
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If Not IsNothing(m_dgColumn) Then
|
|
||||||
m_dgColumn.CanUserSort = value
|
|
||||||
Else
|
|
||||||
m_CanUserSort = value
|
|
||||||
End If
|
|
||||||
SaveDataGridColumn()
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New(sName As String)
|
|
||||||
m_Name = sName
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Sub New(sParentDG As String, sName As String, bCanUserReorder As Boolean, bCanUserResize As Boolean, bCanUserSort As Boolean, bIsReadOnly As Boolean, Width As DataGridLength)
|
|
||||||
m_ParentDataGridName = sParentDG
|
|
||||||
m_Name = sName
|
|
||||||
m_CanUserReorder = bCanUserReorder
|
|
||||||
m_CanUserResize = bCanUserResize
|
|
||||||
m_CanUserSort = bCanUserSort
|
|
||||||
m_IsReadOnly = bIsReadOnly
|
|
||||||
m_Width = Width
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend Sub InitColumn(dgColumn As DataGridColumn)
|
|
||||||
m_dgColumn = dgColumn
|
|
||||||
m_dgColumn.CanUserReorder = m_CanUserReorder
|
|
||||||
m_dgColumn.CanUserResize = m_CanUserResize
|
|
||||||
m_dgColumn.CanUserSort = m_CanUserSort
|
|
||||||
m_dgColumn.IsReadOnly = m_IsReadOnly
|
|
||||||
'm_dgColumn.DisplayIndex = m_DisplayIndex
|
|
||||||
m_dgColumn.Width = m_Width
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
' funzione per calcolare e scrivere la stringa dei parametri della colonna nell'INI
|
|
||||||
Public Function SaveDataGridColumn() As Boolean
|
|
||||||
Dim bOk As Boolean
|
|
||||||
Dim sColumnParams = String.Empty
|
|
||||||
sColumnParams = Name & "," & If(CanUserReorder, 1, 0) & "," & If(CanUserResize, 1, 0) & "," & If(CanUserSort, 1, 0) & "," & If(IsReadOnly, 1, 0) & "," & DoubleToString(Width.Value, 6) & "," & Width.UnitType
|
|
||||||
bOk = WriteColumnPrivateProfileParam(ParentDataGridName, DisplayIndex, sColumnParams)
|
|
||||||
Return bOk
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
|
|
||||||
Module Map
|
Module Map
|
||||||
|
|
||||||
@@ -9,8 +8,8 @@ Module Map
|
|||||||
Private m_refProdManagerVM As ProdManagerVM
|
Private m_refProdManagerVM As ProdManagerVM
|
||||||
Private m_refProjectVM As ProjectVM
|
Private m_refProjectVM As ProjectVM
|
||||||
Private m_refMainMenuVM As MainMenuVM
|
Private m_refMainMenuVM As MainMenuVM
|
||||||
'Private m_refMachinePanelVM As MachinePanelVM
|
Private m_refMachinePanelVM As MachinePanelVM
|
||||||
'Private m_refMyMachGroupPanelVM As MyMachGroupPanelVM
|
Private m_refMyMachGroupPanelVM As MyMachGroupPanelVM
|
||||||
Private m_refLeftPanelVM As LeftPanelVM
|
Private m_refLeftPanelVM As LeftPanelVM
|
||||||
Private m_refBottomPanelVM As BottomPanelVM
|
Private m_refBottomPanelVM As BottomPanelVM
|
||||||
Private m_refShowBeamPanelVM As ShowBeamPanelVM
|
Private m_refShowBeamPanelVM As ShowBeamPanelVM
|
||||||
@@ -84,7 +83,7 @@ Module Map
|
|||||||
|
|
||||||
Public ReadOnly Property refMachinePanelVM As MachinePanelVM
|
Public ReadOnly Property refMachinePanelVM As MachinePanelVM
|
||||||
Get
|
Get
|
||||||
Return CoreMap.refMachinePanelVM
|
Return m_refMachinePanelVM
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -96,7 +95,7 @@ Module Map
|
|||||||
|
|
||||||
Public ReadOnly Property refMachGroupPanelVM As MyMachGroupPanelVM
|
Public ReadOnly Property refMachGroupPanelVM As MyMachGroupPanelVM
|
||||||
Get
|
Get
|
||||||
Return CoreMap.refMachGroupPanelVM
|
Return m_refMyMachGroupPanelVM
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -266,8 +265,8 @@ Module Map
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
|
Friend Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
|
||||||
CoreMap.SetRefMachinePanelVM(MachinePanelVM)
|
m_refMachinePanelVM = MachinePanelVM
|
||||||
Return Not IsNothing(CoreMap.refMachinePanelVM)
|
Return Not IsNothing(m_refMachinePanelVM)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function SetRefLeftPanelVM(LeftPanelVM As LeftPanelVM) As Boolean
|
Friend Function SetRefLeftPanelVM(LeftPanelVM As LeftPanelVM) As Boolean
|
||||||
@@ -276,8 +275,8 @@ Module Map
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
|
Friend Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
|
||||||
CoreMap.SetRefMachGroupPanelVM(MachGroupPanelVM)
|
m_refMyMachGroupPanelVM = MachGroupPanelVM
|
||||||
Return Not IsNothing(CoreMap.refMachGroupPanelVM)
|
Return Not IsNothing(m_refMyMachGroupPanelVM)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function SetRefBottomPanelVM(BottomPanelVM As BottomPanelVM) As Boolean
|
Friend Function SetRefBottomPanelVM(BottomPanelVM As BottomPanelVM) As Boolean
|
||||||
@@ -407,7 +406,7 @@ Module Map
|
|||||||
Not IsNothing(LibMap.refStatusBarVM) AndAlso Not IsNothing(m_refProjManagerVM) AndAlso
|
Not IsNothing(LibMap.refStatusBarVM) AndAlso Not IsNothing(m_refProjManagerVM) AndAlso
|
||||||
Not IsNothing(m_refProdManagerVM) AndAlso Not IsNothing(m_refConfigurationPageVM) AndAlso
|
Not IsNothing(m_refProdManagerVM) AndAlso Not IsNothing(m_refConfigurationPageVM) AndAlso
|
||||||
Not IsNothing(LibMap.refSceneHostVM) AndAlso Not IsNothing(LibMap.refShowPanelVM) AndAlso
|
Not IsNothing(LibMap.refSceneHostVM) AndAlso Not IsNothing(LibMap.refShowPanelVM) AndAlso
|
||||||
Not IsNothing(CoreMap.refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM) AndAlso
|
Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM) AndAlso
|
||||||
Not IsNothing(m_refRawPartListVM) AndAlso Not IsNothing(m_refWarehouseWndVM) AndAlso
|
Not IsNothing(m_refRawPartListVM) AndAlso Not IsNothing(m_refWarehouseWndVM) AndAlso
|
||||||
Not IsNothing(m_refFeatureListVM) AndAlso Not IsNothing(m_refPartInRawPartListVM) AndAlso
|
Not IsNothing(m_refFeatureListVM) AndAlso Not IsNothing(m_refPartInRawPartListVM) AndAlso
|
||||||
Not IsNothing(m_refFreeContourManagerVM) AndAlso Not IsNothing(m_refFreeContourInputVM) AndAlso
|
Not IsNothing(m_refFreeContourManagerVM) AndAlso Not IsNothing(m_refFreeContourInputVM) AndAlso
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user