Compare commits

...

6 Commits

Author SHA1 Message Date
RenzoL 0a45d1af95 - Sistemati FeatureManager e Parametri P/Q visualizzati a seconda del Layer o Part selezionato 2022-04-08 17:39:09 +02:00
RenzoL b41454183f - Sistemati visibilità e bDO/bDOALL di FeatureListV per Layer e Part
- Nascosto (commentato) il filtro ricerca Part
2022-04-07 16:34:36 +02:00
RenzoL 7e7258dd7c - Parziale pulizia codice
- Disabilitati bottoni apertura e salvataggio in LayersWallProjManager
2022-04-07 09:45:15 +02:00
RenzoL 19a8ca1267 - Correzioni su Selezioni/Deselezioni/Riselezioni dei Part nella DG e dei Layer nel TreeView
- Inserite 2 FeatureListV separate (e parte di 2 diverse Tab) per Layer e Part selezionati
2022-04-07 08:59:16 +02:00
RenzoL e88c603fca - Corretta property sNAMplus per Element e Layer 2022-04-01 12:53:03 +02:00
RenzoL a62f0ca724 LayersWall WIP : - Aggiunta nuova pagina LayersWall per aprire progetti di tipo Pareti Layer
- Creati nuovi Panel e Manager dedicati nella pagina LayersWall (simili ai già esistenti in Visualizzatore ma preceduti da "LayersWall")
- Aggiunto ElementLayerTreeView come albero per i Composite di tipo Element e Layer
- Aggiunti BTLElement e BTLLayer che ereditano da BTLPart (Element contiene Layer, Layer contiene Part e Feature)
2022-04-01 09:56:04 +02:00
42 changed files with 10693 additions and 53 deletions
+577
View File
@@ -0,0 +1,577 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtWPFLib5
Public Class BTLElementM
Inherits BTLPartM
' lista delle feature del pezzo
Public m_BTLLayerMList As List(Of BTLLayerM)
Public Property BTLLayerMList As List(Of BTLLayerM)
Get
Return m_BTLLayerMList
End Get
Set(value As List(Of BTLLayerM))
m_BTLLayerMList = value
End Set
End Property
Public ReadOnly Property sName As String
Get
Return "Prova"
End Get
End Property
#Region "CONSTRUCTOR"
Protected Sub New()
End Sub
Public Shared Function CreateNewBTLElement() As BTLElementM
Return New BTLPartM
End Function
Public Shared Function CreateBTLElement(nGroupId As Integer) As BTLElementM
Dim NewBTLElement As New BTLElementM
NewBTLElement = CreateBTLElementAsPart(nGroupId)
Return NewBTLElement
End Function
Public Overloads Shared Function CreateBTLElementAsPart(nPartId As Integer) As BTLElementM
Dim NewBTLPart As New BTLElementM
NewBTLPart.m_nPartId = nPartId
' leggo info pezzo
Dim sValArray() As String
Dim sValue As String = String.Empty
Dim nValue As Integer = 0
EgtGetInfo(nPartId, BTL_PRT_PDN, NewBTLPart.m_nPDN)
Dim nDO As Integer = 1
If EgtGetInfo(nPartId, BTL_PRT_DO, nDO) Then
NewBTLPart.m_bDO = (nDO <> 0)
Else
NewBTLPart.m_bDO = True
End If
EgtGetInfo(nPartId, BTL_PRT_NAM, NewBTLPart.m_sNAM)
EgtGetInfo(nPartId, BTL_PRT_L, NewBTLPart.m_dBtlL)
EgtGetInfo(nPartId, BTL_PRT_W, NewBTLPart.m_dBtlW)
EgtGetInfo(nPartId, BTL_PRT_H, NewBTLPart.m_dBtlH)
EgtGetInfo(nPartId, BTL_PRT_CNT, NewBTLPart.m_nCNT)
EgtGetInfo(nPartId, BTL_PRT_ADDED, NewBTLPart.m_nADDED)
EgtGetInfo(nPartId, BTL_PRT_ASSEMBLYNUM, NewBTLPart.m_sASSEMBLYNUM)
EgtGetInfo(nPartId, BTL_PRT_ORDERNUM, NewBTLPart.m_nORDERNUM)
EgtGetInfo(nPartId, BTL_PRT_DESIGNATION, NewBTLPart.m_sDESIGN)
EgtGetInfo(nPartId, BTL_PRT_ANNOTATION, NewBTLPart.m_sANNOT)
EgtGetInfo(nPartId, BTL_PRT_STOREY, NewBTLPart.m_sSTOREY)
EgtGetInfo(nPartId, BTL_PRT_GROUP, NewBTLPart.m_sGROUP)
EgtGetInfo(nPartId, BTL_PRT_PACKAGE, NewBTLPart.m_sPACKAGE)
EgtGetInfo(nPartId, BTL_PRT_TIMBERGRADE, NewBTLPart.m_sTIMBERGRADE)
EgtGetInfo(nPartId, BTL_PRT_QUALITYGRADE, NewBTLPart.m_sQUALITYGRADE)
EgtGetInfo(nPartId, BTL_PRT_COLOUR, sValue)
NewBTLPart.m_colCOLOR.FromString(sValue)
EgtGetInfo(nPartId, BTL_PRT_PLANINGLENGTH, NewBTLPart.m_dPLANINGLEN)
EgtGetInfo(nPartId, BTL_PRT_STARTOFFSET, NewBTLPart.m_dSTARTOFFSET)
EgtGetInfo(nPartId, BTL_PRT_ENDOFFSET, NewBTLPart.m_dENDOFFSET)
Dim ind As Integer = 1
While EgtGetInfo(nPartId, BTL_PRT_UID & ind, nValue)
NewBTLPart.ocUID.Add(nValue)
EgtGetInfo(nPartId, BTL_PRT_TRANSFORMATION & ind, sValue)
NewBTLPart.m_refTransf = New Frame3d
Dim ptOri As New Point3d
Dim vtVersX As New Vector3d
Dim vtVersY As New Vector3d
sValArray = sValue.Split({","}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 9 Then
StringToLen(sValArray(0), ptOri.x)
StringToLen(sValArray(1), ptOri.y)
StringToLen(sValArray(2), ptOri.z)
StringToDouble(sValArray(3), vtVersX.x)
StringToDouble(sValArray(4), vtVersX.y)
StringToDouble(sValArray(5), vtVersX.z)
StringToDouble(sValArray(6), vtVersY.x)
StringToDouble(sValArray(7), vtVersY.y)
StringToDouble(sValArray(8), vtVersY.z)
NewBTLPart.m_refTransf.ChangeOrigin(ptOri)
NewBTLPart.m_refTransf.Setup(ptOri, ptOri + vtVersX, ptOri + vtVersY)
End If
NewBTLPart.refTransfList.Add(NewBTLPart.m_refTransf)
ind = ind + 1
End While
EgtGetInfo(nPartId, BTL_PRT_CAMBER, sValue)
sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 5 Then
StringToLen(sValArray(3), NewBTLPart.m_dCamberLen1)
StringToLen(sValArray(5), NewBTLPart.m_dCamberLen2)
StringToLen(sValArray(7), NewBTLPart.m_dCamberLen3)
StringToLen(sValArray(9), NewBTLPart.m_dCamberCross3)
End If
Dim pFrom As Integer = sValue.IndexOf("SIDE: ") + "SIDE: ".Length
Dim pTo As Integer = sValue.LastIndexOf(" P01")
If pTo >= 0 Then
nValue = CInt(sValue.Substring(pFrom, pTo - pFrom))
NewBTLPart.m_SelCAMBERSIDE = NewBTLPart.ocCAMBERSIDE.IndexOf(CInt(sValue.Substring(pFrom, pTo - pFrom)))
End If
EgtGetInfo(nPartId, BTL_PRT_PARTOFFSET, sValue)
sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 5 Then
StringToLen(sValArray(3), NewBTLPart.m_dPartOffsetSide1)
StringToLen(sValArray(5), NewBTLPart.m_dPartOffsetSide2)
StringToLen(sValArray(7), NewBTLPart.m_dPartOffsetSide3)
StringToLen(sValArray(9), NewBTLPart.m_dPartOffsetSide4)
End If
pFrom = sValue.IndexOf("P04: ") + "P04: ".Length
pTo = sValue.LastIndexOf(" P11")
If pTo >= 0 Then
NewBTLPart.m_SelREFSIDEFIXCLAMP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue.Substring(pFrom, pTo - pFrom),
NewBTLPart.ocREFSIDEFIXCLAMP),
NewBTLPart.ocREFSIDEFIXCLAMP)
End If
Dim EnumIndex As Integer = 0
EgtGetInfo(nPartId, BTL_PRT_PROCESSINGQUALITY, sValue)
For ind = 1 To NewBTLPart.ocPROCESSINGQUALITY.Count
Dim sEnumName = [Enum].GetName(GetType(ProcessingQuality), ind)
If sEnumName.Equals(sValue) Then
EnumIndex = ind
Exit For
End If
Next
NewBTLPart.m_SelPROCESSINGQUALITY = EnumIndex - 1
EgtGetInfo(nPartId, BTL_PRT_RECESS, sValue)
EnumIndex = 0
For ind = 1 To NewBTLPart.ocRECESS.Count
Dim sEnumName = [Enum].GetName(GetType(Recess), ind)
If sEnumName.Equals(sValue) Then
EnumIndex = ind
Exit For
End If
Next
NewBTLPart.m_SelRECESS = EnumIndex - 1
EgtGetInfo(nPartId, BTL_PRT_STOREYTYPE, sValue)
EnumIndex = 0
For ind = 1 To NewBTLPart.ocSTOREYTYPE.Count
Dim sEnumName = [Enum].GetName(GetType(StoreyType), ind)
If sEnumName.Equals(sValue) Then
EnumIndex = ind
Exit For
End If
Next
NewBTLPart.m_SelSTOREYTYPE = EnumIndex - 1
EgtGetInfo(nPartId, BTL_PRT_ELEMENTNUM, NewBTLPart.m_sELEMENTNUM)
EgtGetInfo(nPartId, BTL_PRT_LAYER, NewBTLPart.m_nLAYER)
EgtGetInfo(nPartId, BTL_PRT_MODULENUM, NewBTLPart.m_sMODULENUM)
'EgtGetInfo(nPartId, BTL_PRT_USERATTRIBUTE, m_sUSERATTRIBUTE)
EgtGetInfo(nPartId, BTL_PRT_COMMENT, NewBTLPart.m_sCOMMENT)
EgtGetInfo(nPartId, BTL_PRT_GRAINDIR, sValue)
NewBTLPart.m_refGrainDir = New Vector3d
sValArray = sValue.Split(New String() {",", ";"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 4 Then
StringToDouble(sValArray(0), NewBTLPart.m_refGrainDir.x)
StringToDouble(sValArray(1), NewBTLPart.m_refGrainDir.y)
StringToDouble(sValArray(2), NewBTLPart.m_refGrainDir.z)
NewBTLPart.m_bGRAINDIRALIGN = (CInt(sValArray(3)) = 1)
End If
EgtGetInfo(nPartId, BTL_PRT_REFSIDE, sValue)
sValArray = sValue.Split({";"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 2 Then
NewBTLPart.m_SelREFSIDE = NewBTLPart.ocREFSIDE.IndexOf(CInt(sValArray(0)))
NewBTLPart.m_bREFSIDEALIGN = (CInt(sValArray(1)) = 1)
End If
EgtGetInfo(nPartId, BTL_PRT_ALIGNMENT, sValue)
sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 2 Then
NewBTLPart.m_SelALIGNLOCATION = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), NewBTLPart.ocALIGNLOCATION),
NewBTLPart.ocALIGNLOCATION)
NewBTLPart.m_SelALIGNENDTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(1).Trim(),
NewBTLPart.ocALIGNENDTYPE),
NewBTLPart.ocALIGNENDTYPE)
End If
EgtGetInfo(nPartId, BTL_PRT_MATERIALTYPE, sValue)
sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 1 Then
NewBTLPart.m_SelMATERIALTYPEGRP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0),
NewBTLPart.ocMATERIALTYPEGRP),
NewBTLPart.ocMATERIALTYPEGRP)
If sValArray.Count() >= 2 Then NewBTLPart.m_sMATERIALTYPESPEC = sValArray(1).Trim()
End If
If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, NewBTLPart.nROTATED) Then
NewBTLPart.nROTATED = 0
End If
If Not EgtGetInfo(nPartId, BTL_PRT_INVERTED, NewBTLPart.nINVERTED) Then
NewBTLPart.nINVERTED = 0
End If
EgtGetInfo(nPartId, BTL_PRT_MATERIAL, NewBTLPart.m_sMATERIAL)
If Not EgtGetInfo(nPartId, LOCK_ROT, NewBTLPart.bLockRotation) Then
NewBTLPart.bLockRotation = False
End If
If Not EgtGetInfo(nPartId, LOCK_FLIP, NewBTLPart.bLockInversion) Then
NewBTLPart.bLockInversion = False
End If
EgtGetInfo(nPartId, BTL_PRT_VOLUME, NewBTLPart.dVolume)
'' Leggo outline e features
'NewBTLPart.m_BTLFeatureMList = LoadFeatures(nPartId, NewBTLPart)
' 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(nPartId, ITG_PROJ_ERR, nErr)
EgtGetInfo(nPartId, ITG_PROJ_ROT, nRot)
EgtGetInfo(nPartId, ITG_PROJ_FALL, nFall)
EgtGetInfo(nPartId, ITG_PROJ_MSG, sMsg)
If Not bCalc Then
NewBTLPart.m_nState = CalcStates.NOTCALCULATED
NewBTLPart.nCALC_ERR = 0
NewBTLPart.m_nCALC_ROT = 0
NewBTLPart.nCALC_FALL = 0
NewBTLPart.sCALC_MSG = ""
Else
NewBTLPart.nCALC_ERR = nErr
NewBTLPart.nCALC_ROT = nRot
NewBTLPart.nCALC_FALL = nFall
NewBTLPart.sCALC_MSG = sMsg
Select Case nErr
Case 0
NewBTLPart.nState = CalcStates.OK
Case 22
NewBTLPart.nState = CalcStates.COLLISION
Case 17, 19
NewBTLPart.nState = CalcStates.WARNING
Case < 0
NewBTLPart.nState = CalcStates.INFO
Case > 0
NewBTLPart.nState = CalcStates.ERROR_
End Select
End If
EgtGetInfo(nPartId, ITG_PROJ_TIME, NewBTLPart.m_nCALC_TIME)
Return NewBTLPart
End Function
' Private Shared Function LoadFeatures(nPartId As Integer, NewBTLPart As BTLPartM) As List(Of BTLFeatureM)
' Dim TempList As New List(Of BTLFeatureM)
' ' Leggo outline
' Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
' Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayerId)
' While nOutlineId <> GDB_ID.NULL
' ' verifico che sia una feature
' Dim nGRP As Integer
' If EgtGetInfo(nOutlineId, BTL_FTR_GRP, nGRP) Then
' ' creo la feature
' TempList.Add(BTLFeatureM.CreateBTLFeature(NewBTLPart, nOutlineId))
' End If
' nOutlineId = EgtGetNext(nOutlineId)
' End While
' ' 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) AndAlso Not EgtExistsInfo(nFeatureId, BTL_FTR_MAINID) Then
' ' creo la feature
' Dim NewFeature As BTLFeatureM = BTLFeatureM.CreateBTLFeature(NewBTLPart, nFeatureId)
' TempList.Add(NewFeature)
' ' aggiorno Id feature perchè potrebbe essere stata ricalcolata
' nFeatureId = NewFeature.nFeatureId
' End If
' nFeatureId = EgtGetNext(nFeatureId)
' End While
' Return TempList
' End Function
' 'Sub New(ParentStructure As BTLStructureVM, nPartId As Integer)
' ' MyBase.New(ParentStructure, nPartId)
' ' ' leggo info pezzo
' ' Dim sValArray() As String
' ' Dim sValue As String = String.Empty
' ' Dim nValue As Integer = 0
' ' EgtGetInfo(nPartId, BTL_PRT_PDN, nPDN)
' ' Dim nDO As Integer = 1
' ' If EgtGetInfo(nPartId, BTL_PRT_DO, nDO) Then
' ' m_bDO = (nDO <> 0)
' ' Else
' ' m_bDO = True
' ' End If
' ' EgtGetInfo(nPartId, BTL_PRT_NAM, m_sNAM)
' ' EgtGetInfo(nPartId, BTL_PRT_L, m_dL)
' ' EgtGetInfo(nPartId, BTL_PRT_W, m_dW)
' ' EgtGetInfo(nPartId, BTL_PRT_H, m_dH)
' ' EgtGetInfo(nPartId, BTL_PRT_CNT, m_nCNT)
' ' EgtGetInfo(nPartId, BTL_PRT_ASSEMBLYNUM, m_sASSEMBLYNUM)
' ' EgtGetInfo(nPartId, BTL_PRT_ORDERNUM, m_nORDERNUM)
' ' EgtGetInfo(nPartId, BTL_PRT_DESIGNATION, m_sDESIGN)
' ' EgtGetInfo(nPartId, BTL_PRT_ANNOTATION, m_sANNOT)
' ' EgtGetInfo(nPartId, BTL_PRT_STOREY, m_sSTOREY)
' ' EgtGetInfo(nPartId, BTL_PRT_GROUP, m_sGROUP)
' ' EgtGetInfo(nPartId, BTL_PRT_PACKAGE, m_sPACKAGE)
' ' EgtGetInfo(nPartId, BTL_PRT_TIMBERGRADE, m_sTIMBERGRADE)
' ' EgtGetInfo(nPartId, BTL_PRT_QUALITYGRADE, m_sQUALITYGRADE)
' ' EgtGetInfo(nPartId, BTL_PRT_COLOUR, sValue)
' ' m_colCOLOR.FromString(sValue)
' ' EgtGetInfo(nPartId, BTL_PRT_PLANINGLENGTH, m_dPLANINGLEN)
' ' EgtGetInfo(nPartId, BTL_PRT_STARTOFFSET, m_dSTARTOFFSET)
' ' EgtGetInfo(nPartId, BTL_PRT_ENDOFFSET, m_dENDOFFSET)
' ' Dim ind As Integer = 1
' ' While EgtGetInfo(nPartId, BTL_PRT_UID & ind, nValue)
' ' ocUID.Add(nValue)
' ' EgtGetInfo(nPartId, BTL_PRT_TRANSFORMATION & ind, sValue)
' ' m_refTransf = New Frame3d
' ' Dim ptOri As New Point3d
' ' Dim vtVersX As New Vector3d
' ' Dim vtVersY As New Vector3d
' ' sValArray = sValue.Split({","}, StringSplitOptions.RemoveEmptyEntries)
' ' If sValArray.Count() >= 9 Then
' ' StringToLen(sValArray(0), ptOri.x)
' ' StringToLen(sValArray(1), ptOri.y)
' ' StringToLen(sValArray(2), ptOri.z)
' ' StringToDouble(sValArray(3), vtVersX.x)
' ' StringToDouble(sValArray(4), vtVersX.y)
' ' StringToDouble(sValArray(5), vtVersX.z)
' ' StringToDouble(sValArray(6), vtVersY.x)
' ' StringToDouble(sValArray(7), vtVersY.y)
' ' StringToDouble(sValArray(8), vtVersY.z)
' ' m_refTransf.ChangeOrigin(ptOri)
' ' m_refTransf.Setup(ptOri, ptOri + vtVersX, ptOri + vtVersY)
' ' End If
' ' refTransfList.Add(m_refTransf)
' ' ind = ind + 1
' ' End While
' ' EgtGetInfo(nPartId, BTL_PRT_CAMBER, sValue)
' ' sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
' ' If sValArray.Count() >= 5 Then
' ' StringToLen(sValArray(3), m_dCamberLen1)
' ' StringToLen(sValArray(5), m_dCamberLen2)
' ' StringToLen(sValArray(7), m_dCamberLen3)
' ' StringToLen(sValArray(9), m_dCamberCross3)
' ' End If
' ' Dim pFrom As Integer = sValue.IndexOf("SIDE: ") + "SIDE: ".Length
' ' Dim pTo As Integer = sValue.LastIndexOf(" P01")
' ' If pTo >= 0 Then
' ' nValue = CInt(sValue.Substring(pFrom, pTo - pFrom))
' ' m_SelCAMBERSIDE = ocCAMBERSIDE.IndexOf(CInt(sValue.Substring(pFrom, pTo - pFrom)))
' ' End If
' ' EgtGetInfo(nPartId, BTL_PRT_PARTOFFSET, sValue)
' ' sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
' ' If sValArray.Count() >= 5 Then
' ' StringToLen(sValArray(3), m_dPartOffsetSide1)
' ' StringToLen(sValArray(5), m_dPartOffsetSide2)
' ' StringToLen(sValArray(7), m_dPartOffsetSide3)
' ' StringToLen(sValArray(9), m_dPartOffsetSide4)
' ' End If
' ' pFrom = sValue.IndexOf("P04: ") + "P04: ".Length
' ' pTo = sValue.LastIndexOf(" P11")
' ' If pTo >= 0 Then
' ' m_SelREFSIDEFIXCLAMP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue.Substring(pFrom, pTo - pFrom), ocREFSIDEFIXCLAMP), ocREFSIDEFIXCLAMP)
' ' End If
' ' EgtGetInfo(nPartId, BTL_PRT_PROCESSINGQUALITY, sValue)
' ' m_SelPROCESSINGQUALITY = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, ocPROCESSINGQUALITY), ocPROCESSINGQUALITY)
' ' EgtGetInfo(nPartId, BTL_PRT_RECESS, sValue)
' ' m_SelRECESS = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, ocRECESS), ocRECESS)
' ' EgtGetInfo(nPartId, BTL_PRT_STOREYTYPE, sValue)
' ' m_SelSTOREYTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, ocSTOREYTYPE), ocSTOREYTYPE)
' ' EgtGetInfo(nPartId, BTL_PRT_ELEMENTNUM, m_sELEMENTNUM)
' ' EgtGetInfo(nPartId, BTL_PRT_LAYER, m_nLAYER)
' ' EgtGetInfo(nPartId, BTL_PRT_MODULENUM, m_sMODULENUM)
' ' 'EgtGetInfo(nPartId, BTL_PRT_USERATTRIBUTE, m_sUSERATTRIBUTE)
' ' EgtGetInfo(nPartId, BTL_PRT_COMMENT, m_sCOMMENT)
' ' EgtGetInfo(nPartId, BTL_PRT_GRAINDIR, sValue)
' ' m_refGrainDir = New Vector3d
' ' sValArray = sValue.Split(New String() {",", ";"}, StringSplitOptions.RemoveEmptyEntries)
' ' If sValArray.Count() >= 4 Then
' ' StringToDouble(sValArray(0), m_refGrainDir.x)
' ' StringToDouble(sValArray(1), m_refGrainDir.y)
' ' StringToDouble(sValArray(2), m_refGrainDir.z)
' ' m_bGRAINDIRALIGN = (CInt(sValArray(3)) = 1)
' ' End If
' ' EgtGetInfo(nPartId, BTL_PRT_REFSIDE, sValue)
' ' sValArray = sValue.Split({";"}, StringSplitOptions.RemoveEmptyEntries)
' ' If sValArray.Count() >= 2 Then
' ' m_SelREFSIDE = ocREFSIDE.IndexOf(CInt(sValArray(0)))
' ' m_bREFSIDEALIGN = (CInt(sValArray(1)) = 1)
' ' End If
' ' EgtGetInfo(nPartId, BTL_PRT_ALIGNMENT, sValue)
' ' sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
' ' If sValArray.Count() >= 2 Then
' ' m_SelALIGNLOCATION = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), ocALIGNLOCATION), ocALIGNLOCATION)
' ' m_SelALIGNENDTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(1).Trim(), ocALIGNENDTYPE), ocALIGNENDTYPE)
' ' End If
' ' EgtGetInfo(nPartId, BTL_PRT_MATERIALTYPE, sValue)
' ' sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
' ' If sValArray.Count() >= 1 Then
' ' m_SelMATERIALTYPEGRP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), ocMATERIALTYPEGRP), ocMATERIALTYPEGRP)
' ' If sValArray.Count() >= 2 Then m_sMATERIALTYPESPEC = sValArray(1).Trim()
' ' End If
' ' If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, m_nROTATED) Then
' ' m_nROTATED = 0
' ' End If
' ' If Not EgtGetInfo(nPartId, BTL_PRT_INVERTED, m_nINVERTED) Then
' ' m_nINVERTED = 0
' ' End If
' ' If EgtGetInfo(nPartId, BTL_PRT_MATERIAL, m_sMATERIAL) Then
' ' If Not ParentStructure.MaterialList.Contains(m_sMATERIAL) Then
' ' ParentStructure.MaterialList.Add(m_sMATERIAL)
' ' End If
' ' End If
' ' If Not ParentStructure.SectionList.Contains(Section) Then
' ' ParentStructure.SectionList.Add(Section)
' ' End If
' ' ' Leggo outline
' ' Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
' ' Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayerId)
' ' While nOutlineId <> GDB_ID.NULL
' ' ' verifico che sia una feature
' ' Dim nGRP As Integer
' ' If EgtGetInfo(nOutlineId, BTL_FTR_GRP, nGRP) Then
' ' ' creo la feature
' ' m_FeatureList.Add(New BTLFeatureVM(Me, nOutlineId))
' ' End If
' ' nOutlineId = EgtGetNext(nOutlineId)
' ' End While
' ' ' 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
' ' m_FeatureList.Add(New BTLFeatureVM(Me, nFeatureId))
' ' End If
' ' nFeatureId = EgtGetNext(nFeatureId)
' ' End While
' ' ' Aggiorno check DOALL
' ' NotifyPropertyChanged("bDOALL")
' ' ' 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(nPartId, ITG_PROJ_ERR, nErr)
' ' EgtGetInfo(nPartId, ITG_PROJ_ROT, nRot)
' ' EgtGetInfo(nPartId, ITG_PROJ_FALL, sMsg)
' ' EgtGetInfo(nPartId, ITG_PROJ_MSG, sMsg)
' ' CalcPartUpdate(bCalc, nErr, nRot, nFall, sMsg)
' ' CalcFeatureUpdate()
' 'End Sub
' 'Sub New(ParentStructure As BTLStructure, nPartId As Integer)
' ' m_BTLStructureM = ParentStructure
' ' Me.SetPartId = nPartId
' ' m_FeatureList = New ObservableCollection(Of BTLFeature)
' 'End Sub
'#End Region ' CONSTRUCTOR
'#Region "METHODS"
' Public Event BTLFeatureAdded As EventHandler(Of BTLFeatureAddedEventArgs)
' Public Sub AddBTLFeature(BTLFeatureM As BTLFeatureM)
' If IsNothing(BTLFeatureM) Then Return
' If Not m_BTLFeatureMList.Contains(BTLFeatureM) Then
' m_BTLFeatureMList.Add(BTLFeatureM)
' RaiseEvent BTLFeatureAdded(Me, New BTLFeatureAddedEventArgs(BTLFeatureM))
' End If
' End Sub
' Public Function GetBTLFeatures() As List(Of BTLFeatureM)
' Return New List(Of BTLFeatureM)(m_BTLFeatureMList)
' End Function
' Public Function Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional dAng As Double = 90) As Boolean
' ' recupero il box del pezzo
' Dim nLs As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
' Dim b3Solid As New BBox3d
' EgtGetBBoxGlob(nLs, GDB_BB.STANDARD, b3Solid)
' If b3Solid.IsEmpty() Then
' EgtOutLog("ERROR: Box non definito per la trave " & sNAM)
' Return False
' End If
' ' eseguo rotazione di 90 gradi attorno asse X
' Dim dRot = If(IsPositive, 1, -1) * Math.Abs(dAng)
' Dim vtAxes As Vector3d
' ' se travi ruoto attorno all'asse X
' If SelectedMachineType = MachineType.BEAM Then
' vtAxes = Vector3d.X_AX
' ' se pareti ruoto attorno all'asse Z
' ElseIf SelectedMachineType = MachineType.WALL Then
' vtAxes = -Vector3d.Z_AX
' End If
' ' se invertito
' Dim bInverted As Boolean = nINVERTED <> 0
' If bInverted Then
' ' annullo inversione
' Inversion(SelectedMachineType)
' End If
' ' eseguo rotazione
' Dim bOk As Boolean = EgtRotate(nPartId, b3Solid.Center, vtAxes, dRot, GDB_RT.GLOB)
' If bOk Then
' Dim dNewRotation As Double = (nROTATED + dRot) Mod 360
' nROTATED = If(dNewRotation >= 0, dNewRotation, 360 + dNewRotation)
' EgtSetInfo(nPartId, BTL_PRT_ROTATED, nROTATED)
' ' imposto modificato per copie
' EgtDuploSetModified(nPartId)
' End If
' ' se era invertito
' If bInverted Then
' ' ripristino inversione
' Inversion(SelectedMachineType)
' End If
' EgtDraw()
' Return bOk
' End Function
' Public Sub Inversion(SelectedMachineType As MachineType)
' ' recupero il box del pezzo
' Dim nLs As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
' Dim b3Solid As New BBox3d
' EgtGetBBoxGlob(nLs, GDB_BB.STANDARD, b3Solid)
' If b3Solid.IsEmpty() Then
' EgtOutLog("ERROR: Box non definito per la trave " & sNAM)
' Return
' End If
' Dim vtAxes As Vector3d
' ' se travi ruoto attorno all'asse Z
' If SelectedMachineType = MachineType.BEAM Then
' vtAxes = Vector3d.Z_AX
' ' se pareti ruoto attorno all'asse X
' ElseIf SelectedMachineType = MachineType.WALL Then
' vtAxes = Vector3d.X_AX
' End If
' ' eseguo rotazione di 180 gradi
' If EgtRotate(nPartId, b3Solid.Center, vtAxes, 180, GDB_RT.GLOB) Then
' nINVERTED = If(nINVERTED = 0, 180, 0)
' EgtSetInfo(nPartId, BTL_PRT_INVERTED, nINVERTED)
' ' imposto modificato per copie
' EgtDuploSetModified(nPartId)
' End If
' End Sub
' Public Function NewProcId() As Integer
' Dim nMaxProcId As Integer = 0
' If Not IsNothing(BTLFeatureMList) AndAlso BTLFeatureMList.Count > 0 Then
' nMaxProcId = BTLFeatureMList.Max(Function(x) x.nPRID)
' End If
' Return nMaxProcId + 1
' End Function
#End Region ' METHODS
End Class
+570
View File
@@ -0,0 +1,570 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports EgtWPFLib5
Public Class BTLLayerM
Inherits BTLPartM
Public m_BTLPartMList As List(Of BTLPartM)
Public Property BTLPartMList As List(Of BTLPartM)
Get
Return m_BTLPartMList
End Get
Set(value As List(Of BTLPartM))
m_BTLPartMList = value
End Set
End Property
#Region "CONSTRUCTOR"
Protected Sub New()
End Sub
Public Shared Function CreateNewBTLLayer() As BTLLayerM
Return New BTLPartM
End Function
Public Shared Function CreateBTLLayer(nGroupId As Integer) As BTLLayerM
Dim NewBTLLayer As New BTLLayerM
NewBTLLayer = CreateBTLLayerAsPart(nGroupId)
Return NewBTLLayer
End Function
Public Overloads Shared Function CreateBTLLayerAsPart(nPartId As Integer) As BTLLayerM
Dim NewBTLPart As New BTLLayerM
NewBTLPart.m_nPartId = nPartId
' leggo info pezzo
Dim sValArray() As String
Dim sValue As String = String.Empty
Dim nValue As Integer = 0
EgtGetInfo(nPartId, BTL_PRT_PDN, NewBTLPart.m_nPDN)
Dim nDO As Integer = 1
If EgtGetInfo(nPartId, BTL_PRT_DO, nDO) Then
NewBTLPart.m_bDO = (nDO <> 0)
Else
NewBTLPart.m_bDO = True
End If
EgtGetInfo(nPartId, BTL_PRT_NAM, NewBTLPart.m_sNAM)
EgtGetInfo(nPartId, BTL_PRT_L, NewBTLPart.m_dBtlL)
EgtGetInfo(nPartId, BTL_PRT_W, NewBTLPart.m_dBtlW)
EgtGetInfo(nPartId, BTL_PRT_H, NewBTLPart.m_dBtlH)
EgtGetInfo(nPartId, BTL_PRT_CNT, NewBTLPart.m_nCNT)
EgtGetInfo(nPartId, BTL_PRT_ADDED, NewBTLPart.m_nADDED)
EgtGetInfo(nPartId, BTL_PRT_ASSEMBLYNUM, NewBTLPart.m_sASSEMBLYNUM)
EgtGetInfo(nPartId, BTL_PRT_ORDERNUM, NewBTLPart.m_nORDERNUM)
EgtGetInfo(nPartId, BTL_PRT_DESIGNATION, NewBTLPart.m_sDESIGN)
EgtGetInfo(nPartId, BTL_PRT_ANNOTATION, NewBTLPart.m_sANNOT)
EgtGetInfo(nPartId, BTL_PRT_STOREY, NewBTLPart.m_sSTOREY)
EgtGetInfo(nPartId, BTL_PRT_GROUP, NewBTLPart.m_sGROUP)
EgtGetInfo(nPartId, BTL_PRT_PACKAGE, NewBTLPart.m_sPACKAGE)
EgtGetInfo(nPartId, BTL_PRT_TIMBERGRADE, NewBTLPart.m_sTIMBERGRADE)
EgtGetInfo(nPartId, BTL_PRT_QUALITYGRADE, NewBTLPart.m_sQUALITYGRADE)
EgtGetInfo(nPartId, BTL_PRT_COLOUR, sValue)
NewBTLPart.m_colCOLOR.FromString(sValue)
EgtGetInfo(nPartId, BTL_PRT_PLANINGLENGTH, NewBTLPart.m_dPLANINGLEN)
EgtGetInfo(nPartId, BTL_PRT_STARTOFFSET, NewBTLPart.m_dSTARTOFFSET)
EgtGetInfo(nPartId, BTL_PRT_ENDOFFSET, NewBTLPart.m_dENDOFFSET)
Dim ind As Integer = 1
While EgtGetInfo(nPartId, BTL_PRT_UID & ind, nValue)
NewBTLPart.ocUID.Add(nValue)
EgtGetInfo(nPartId, BTL_PRT_TRANSFORMATION & ind, sValue)
NewBTLPart.m_refTransf = New Frame3d
Dim ptOri As New Point3d
Dim vtVersX As New Vector3d
Dim vtVersY As New Vector3d
sValArray = sValue.Split({","}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 9 Then
StringToLen(sValArray(0), ptOri.x)
StringToLen(sValArray(1), ptOri.y)
StringToLen(sValArray(2), ptOri.z)
StringToDouble(sValArray(3), vtVersX.x)
StringToDouble(sValArray(4), vtVersX.y)
StringToDouble(sValArray(5), vtVersX.z)
StringToDouble(sValArray(6), vtVersY.x)
StringToDouble(sValArray(7), vtVersY.y)
StringToDouble(sValArray(8), vtVersY.z)
NewBTLPart.m_refTransf.ChangeOrigin(ptOri)
NewBTLPart.m_refTransf.Setup(ptOri, ptOri + vtVersX, ptOri + vtVersY)
End If
NewBTLPart.refTransfList.Add(NewBTLPart.m_refTransf)
ind = ind + 1
End While
EgtGetInfo(nPartId, BTL_PRT_CAMBER, sValue)
sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 5 Then
StringToLen(sValArray(3), NewBTLPart.m_dCamberLen1)
StringToLen(sValArray(5), NewBTLPart.m_dCamberLen2)
StringToLen(sValArray(7), NewBTLPart.m_dCamberLen3)
StringToLen(sValArray(9), NewBTLPart.m_dCamberCross3)
End If
Dim pFrom As Integer = sValue.IndexOf("SIDE: ") + "SIDE: ".Length
Dim pTo As Integer = sValue.LastIndexOf(" P01")
If pTo >= 0 Then
nValue = CInt(sValue.Substring(pFrom, pTo - pFrom))
NewBTLPart.m_SelCAMBERSIDE = NewBTLPart.ocCAMBERSIDE.IndexOf(CInt(sValue.Substring(pFrom, pTo - pFrom)))
End If
EgtGetInfo(nPartId, BTL_PRT_PARTOFFSET, sValue)
sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 5 Then
StringToLen(sValArray(3), NewBTLPart.m_dPartOffsetSide1)
StringToLen(sValArray(5), NewBTLPart.m_dPartOffsetSide2)
StringToLen(sValArray(7), NewBTLPart.m_dPartOffsetSide3)
StringToLen(sValArray(9), NewBTLPart.m_dPartOffsetSide4)
End If
pFrom = sValue.IndexOf("P04: ") + "P04: ".Length
pTo = sValue.LastIndexOf(" P11")
If pTo >= 0 Then
NewBTLPart.m_SelREFSIDEFIXCLAMP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue.Substring(pFrom, pTo - pFrom),
NewBTLPart.ocREFSIDEFIXCLAMP),
NewBTLPart.ocREFSIDEFIXCLAMP)
End If
Dim EnumIndex As Integer = 0
EgtGetInfo(nPartId, BTL_PRT_PROCESSINGQUALITY, sValue)
For ind = 1 To NewBTLPart.ocPROCESSINGQUALITY.Count
Dim sEnumName = [Enum].GetName(GetType(ProcessingQuality), ind)
If sEnumName.Equals(sValue) Then
EnumIndex = ind
Exit For
End If
Next
NewBTLPart.m_SelPROCESSINGQUALITY = EnumIndex - 1
EgtGetInfo(nPartId, BTL_PRT_RECESS, sValue)
EnumIndex = 0
For ind = 1 To NewBTLPart.ocRECESS.Count
Dim sEnumName = [Enum].GetName(GetType(Recess), ind)
If sEnumName.Equals(sValue) Then
EnumIndex = ind
Exit For
End If
Next
NewBTLPart.m_SelRECESS = EnumIndex - 1
EgtGetInfo(nPartId, BTL_PRT_STOREYTYPE, sValue)
EnumIndex = 0
For ind = 1 To NewBTLPart.ocSTOREYTYPE.Count
Dim sEnumName = [Enum].GetName(GetType(StoreyType), ind)
If sEnumName.Equals(sValue) Then
EnumIndex = ind
Exit For
End If
Next
NewBTLPart.m_SelSTOREYTYPE = EnumIndex - 1
EgtGetInfo(nPartId, BTL_PRT_ELEMENTNUM, NewBTLPart.m_sELEMENTNUM)
EgtGetInfo(nPartId, BTL_PRT_LAYER, NewBTLPart.m_nLAYER)
EgtGetInfo(nPartId, BTL_PRT_MODULENUM, NewBTLPart.m_sMODULENUM)
'EgtGetInfo(nPartId, BTL_PRT_USERATTRIBUTE, m_sUSERATTRIBUTE)
EgtGetInfo(nPartId, BTL_PRT_COMMENT, NewBTLPart.m_sCOMMENT)
EgtGetInfo(nPartId, BTL_PRT_GRAINDIR, sValue)
NewBTLPart.m_refGrainDir = New Vector3d
sValArray = sValue.Split(New String() {",", ";"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 4 Then
StringToDouble(sValArray(0), NewBTLPart.m_refGrainDir.x)
StringToDouble(sValArray(1), NewBTLPart.m_refGrainDir.y)
StringToDouble(sValArray(2), NewBTLPart.m_refGrainDir.z)
NewBTLPart.m_bGRAINDIRALIGN = (CInt(sValArray(3)) = 1)
End If
EgtGetInfo(nPartId, BTL_PRT_REFSIDE, sValue)
sValArray = sValue.Split({";"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 2 Then
NewBTLPart.m_SelREFSIDE = NewBTLPart.ocREFSIDE.IndexOf(CInt(sValArray(0)))
NewBTLPart.m_bREFSIDEALIGN = (CInt(sValArray(1)) = 1)
End If
EgtGetInfo(nPartId, BTL_PRT_ALIGNMENT, sValue)
sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 2 Then
NewBTLPart.m_SelALIGNLOCATION = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), NewBTLPart.ocALIGNLOCATION),
NewBTLPart.ocALIGNLOCATION)
NewBTLPart.m_SelALIGNENDTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(1).Trim(),
NewBTLPart.ocALIGNENDTYPE),
NewBTLPart.ocALIGNENDTYPE)
End If
EgtGetInfo(nPartId, BTL_PRT_MATERIALTYPE, sValue)
sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
If sValArray.Count() >= 1 Then
NewBTLPart.m_SelMATERIALTYPEGRP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0),
NewBTLPart.ocMATERIALTYPEGRP),
NewBTLPart.ocMATERIALTYPEGRP)
If sValArray.Count() >= 2 Then NewBTLPart.m_sMATERIALTYPESPEC = sValArray(1).Trim()
End If
If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, NewBTLPart.nROTATED) Then
NewBTLPart.nROTATED = 0
End If
If Not EgtGetInfo(nPartId, BTL_PRT_INVERTED, NewBTLPart.nINVERTED) Then
NewBTLPart.nINVERTED = 0
End If
EgtGetInfo(nPartId, BTL_PRT_MATERIAL, NewBTLPart.m_sMATERIAL)
If Not EgtGetInfo(nPartId, LOCK_ROT, NewBTLPart.bLockRotation) Then
NewBTLPart.bLockRotation = False
End If
If Not EgtGetInfo(nPartId, LOCK_FLIP, NewBTLPart.bLockInversion) Then
NewBTLPart.bLockInversion = False
End If
EgtGetInfo(nPartId, BTL_PRT_VOLUME, NewBTLPart.dVolume)
' Leggo outline e features
NewBTLPart.m_BTLFeatureMList = LoadFeatures(nPartId, NewBTLPart)
' 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(nPartId, ITG_PROJ_ERR, nErr)
EgtGetInfo(nPartId, ITG_PROJ_ROT, nRot)
EgtGetInfo(nPartId, ITG_PROJ_FALL, nFall)
EgtGetInfo(nPartId, ITG_PROJ_MSG, sMsg)
If Not bCalc Then
NewBTLPart.m_nState = CalcStates.NOTCALCULATED
NewBTLPart.nCALC_ERR = 0
NewBTLPart.m_nCALC_ROT = 0
NewBTLPart.nCALC_FALL = 0
NewBTLPart.sCALC_MSG = ""
Else
NewBTLPart.nCALC_ERR = nErr
NewBTLPart.nCALC_ROT = nRot
NewBTLPart.nCALC_FALL = nFall
NewBTLPart.sCALC_MSG = sMsg
Select Case nErr
Case 0
NewBTLPart.nState = CalcStates.OK
Case 22
NewBTLPart.nState = CalcStates.COLLISION
Case 17, 19
NewBTLPart.nState = CalcStates.WARNING
Case < 0
NewBTLPart.nState = CalcStates.INFO
Case > 0
NewBTLPart.nState = CalcStates.ERROR_
End Select
End If
EgtGetInfo(nPartId, ITG_PROJ_TIME, NewBTLPart.m_nCALC_TIME)
Return NewBTLPart
End Function
Private Shared Function LoadFeatures(nPartId As Integer, NewBTLPart As BTLLayerM) As List(Of BTLFeatureM)
Dim TempList As New List(Of BTLFeatureM)
' Leggo outline
Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayerId)
While nOutlineId <> GDB_ID.NULL
' verifico che sia una feature
Dim nGRP As Integer
If EgtGetInfo(nOutlineId, BTL_FTR_GRP, nGRP) Then
' creo la feature
TempList.Add(BTLFeatureM.CreateBTLFeature(NewBTLPart, nOutlineId))
End If
nOutlineId = EgtGetNext(nOutlineId)
End While
' 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) AndAlso Not EgtExistsInfo(nFeatureId, BTL_FTR_MAINID) Then
' creo la feature
Dim NewFeature As BTLFeatureM = BTLFeatureM.CreateBTLFeature(NewBTLPart, nFeatureId)
TempList.Add(NewFeature)
' aggiorno Id feature perchè potrebbe essere stata ricalcolata
nFeatureId = NewFeature.nFeatureId
End If
nFeatureId = EgtGetNext(nFeatureId)
End While
Return TempList
End Function
'Sub New(ParentStructure As BTLStructureVM, nPartId As Integer)
' MyBase.New(ParentStructure, nPartId)
' ' leggo info pezzo
' Dim sValArray() As String
' Dim sValue As String = String.Empty
' Dim nValue As Integer = 0
' EgtGetInfo(nPartId, BTL_PRT_PDN, nPDN)
' Dim nDO As Integer = 1
' If EgtGetInfo(nPartId, BTL_PRT_DO, nDO) Then
' m_bDO = (nDO <> 0)
' Else
' m_bDO = True
' End If
' EgtGetInfo(nPartId, BTL_PRT_NAM, m_sNAM)
' EgtGetInfo(nPartId, BTL_PRT_L, m_dL)
' EgtGetInfo(nPartId, BTL_PRT_W, m_dW)
' EgtGetInfo(nPartId, BTL_PRT_H, m_dH)
' EgtGetInfo(nPartId, BTL_PRT_CNT, m_nCNT)
' EgtGetInfo(nPartId, BTL_PRT_ASSEMBLYNUM, m_sASSEMBLYNUM)
' EgtGetInfo(nPartId, BTL_PRT_ORDERNUM, m_nORDERNUM)
' EgtGetInfo(nPartId, BTL_PRT_DESIGNATION, m_sDESIGN)
' EgtGetInfo(nPartId, BTL_PRT_ANNOTATION, m_sANNOT)
' EgtGetInfo(nPartId, BTL_PRT_STOREY, m_sSTOREY)
' EgtGetInfo(nPartId, BTL_PRT_GROUP, m_sGROUP)
' EgtGetInfo(nPartId, BTL_PRT_PACKAGE, m_sPACKAGE)
' EgtGetInfo(nPartId, BTL_PRT_TIMBERGRADE, m_sTIMBERGRADE)
' EgtGetInfo(nPartId, BTL_PRT_QUALITYGRADE, m_sQUALITYGRADE)
' EgtGetInfo(nPartId, BTL_PRT_COLOUR, sValue)
' m_colCOLOR.FromString(sValue)
' EgtGetInfo(nPartId, BTL_PRT_PLANINGLENGTH, m_dPLANINGLEN)
' EgtGetInfo(nPartId, BTL_PRT_STARTOFFSET, m_dSTARTOFFSET)
' EgtGetInfo(nPartId, BTL_PRT_ENDOFFSET, m_dENDOFFSET)
' Dim ind As Integer = 1
' While EgtGetInfo(nPartId, BTL_PRT_UID & ind, nValue)
' ocUID.Add(nValue)
' EgtGetInfo(nPartId, BTL_PRT_TRANSFORMATION & ind, sValue)
' m_refTransf = New Frame3d
' Dim ptOri As New Point3d
' Dim vtVersX As New Vector3d
' Dim vtVersY As New Vector3d
' sValArray = sValue.Split({","}, StringSplitOptions.RemoveEmptyEntries)
' If sValArray.Count() >= 9 Then
' StringToLen(sValArray(0), ptOri.x)
' StringToLen(sValArray(1), ptOri.y)
' StringToLen(sValArray(2), ptOri.z)
' StringToDouble(sValArray(3), vtVersX.x)
' StringToDouble(sValArray(4), vtVersX.y)
' StringToDouble(sValArray(5), vtVersX.z)
' StringToDouble(sValArray(6), vtVersY.x)
' StringToDouble(sValArray(7), vtVersY.y)
' StringToDouble(sValArray(8), vtVersY.z)
' m_refTransf.ChangeOrigin(ptOri)
' m_refTransf.Setup(ptOri, ptOri + vtVersX, ptOri + vtVersY)
' End If
' refTransfList.Add(m_refTransf)
' ind = ind + 1
' End While
' EgtGetInfo(nPartId, BTL_PRT_CAMBER, sValue)
' sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
' If sValArray.Count() >= 5 Then
' StringToLen(sValArray(3), m_dCamberLen1)
' StringToLen(sValArray(5), m_dCamberLen2)
' StringToLen(sValArray(7), m_dCamberLen3)
' StringToLen(sValArray(9), m_dCamberCross3)
' End If
' Dim pFrom As Integer = sValue.IndexOf("SIDE: ") + "SIDE: ".Length
' Dim pTo As Integer = sValue.LastIndexOf(" P01")
' If pTo >= 0 Then
' nValue = CInt(sValue.Substring(pFrom, pTo - pFrom))
' m_SelCAMBERSIDE = ocCAMBERSIDE.IndexOf(CInt(sValue.Substring(pFrom, pTo - pFrom)))
' End If
' EgtGetInfo(nPartId, BTL_PRT_PARTOFFSET, sValue)
' sValArray = sValue.Split(New String() {": ", " P"}, StringSplitOptions.RemoveEmptyEntries)
' If sValArray.Count() >= 5 Then
' StringToLen(sValArray(3), m_dPartOffsetSide1)
' StringToLen(sValArray(5), m_dPartOffsetSide2)
' StringToLen(sValArray(7), m_dPartOffsetSide3)
' StringToLen(sValArray(9), m_dPartOffsetSide4)
' End If
' pFrom = sValue.IndexOf("P04: ") + "P04: ".Length
' pTo = sValue.LastIndexOf(" P11")
' If pTo >= 0 Then
' m_SelREFSIDEFIXCLAMP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue.Substring(pFrom, pTo - pFrom), ocREFSIDEFIXCLAMP), ocREFSIDEFIXCLAMP)
' End If
' EgtGetInfo(nPartId, BTL_PRT_PROCESSINGQUALITY, sValue)
' m_SelPROCESSINGQUALITY = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, ocPROCESSINGQUALITY), ocPROCESSINGQUALITY)
' EgtGetInfo(nPartId, BTL_PRT_RECESS, sValue)
' m_SelRECESS = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, ocRECESS), ocRECESS)
' EgtGetInfo(nPartId, BTL_PRT_STOREYTYPE, sValue)
' m_SelSTOREYTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue, ocSTOREYTYPE), ocSTOREYTYPE)
' EgtGetInfo(nPartId, BTL_PRT_ELEMENTNUM, m_sELEMENTNUM)
' EgtGetInfo(nPartId, BTL_PRT_LAYER, m_nLAYER)
' EgtGetInfo(nPartId, BTL_PRT_MODULENUM, m_sMODULENUM)
' 'EgtGetInfo(nPartId, BTL_PRT_USERATTRIBUTE, m_sUSERATTRIBUTE)
' EgtGetInfo(nPartId, BTL_PRT_COMMENT, m_sCOMMENT)
' EgtGetInfo(nPartId, BTL_PRT_GRAINDIR, sValue)
' m_refGrainDir = New Vector3d
' sValArray = sValue.Split(New String() {",", ";"}, StringSplitOptions.RemoveEmptyEntries)
' If sValArray.Count() >= 4 Then
' StringToDouble(sValArray(0), m_refGrainDir.x)
' StringToDouble(sValArray(1), m_refGrainDir.y)
' StringToDouble(sValArray(2), m_refGrainDir.z)
' m_bGRAINDIRALIGN = (CInt(sValArray(3)) = 1)
' End If
' EgtGetInfo(nPartId, BTL_PRT_REFSIDE, sValue)
' sValArray = sValue.Split({";"}, StringSplitOptions.RemoveEmptyEntries)
' If sValArray.Count() >= 2 Then
' m_SelREFSIDE = ocREFSIDE.IndexOf(CInt(sValArray(0)))
' m_bREFSIDEALIGN = (CInt(sValArray(1)) = 1)
' End If
' EgtGetInfo(nPartId, BTL_PRT_ALIGNMENT, sValue)
' sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
' If sValArray.Count() >= 2 Then
' m_SelALIGNLOCATION = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), ocALIGNLOCATION), ocALIGNLOCATION)
' m_SelALIGNENDTYPE = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(1).Trim(), ocALIGNENDTYPE), ocALIGNENDTYPE)
' End If
' EgtGetInfo(nPartId, BTL_PRT_MATERIALTYPE, sValue)
' sValArray = sValue.Split({":"}, StringSplitOptions.RemoveEmptyEntries)
' If sValArray.Count() >= 1 Then
' m_SelMATERIALTYPEGRP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValArray(0), ocMATERIALTYPEGRP), ocMATERIALTYPEGRP)
' If sValArray.Count() >= 2 Then m_sMATERIALTYPESPEC = sValArray(1).Trim()
' End If
' If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, m_nROTATED) Then
' m_nROTATED = 0
' End If
' If Not EgtGetInfo(nPartId, BTL_PRT_INVERTED, m_nINVERTED) Then
' m_nINVERTED = 0
' End If
' If EgtGetInfo(nPartId, BTL_PRT_MATERIAL, m_sMATERIAL) Then
' If Not ParentStructure.MaterialList.Contains(m_sMATERIAL) Then
' ParentStructure.MaterialList.Add(m_sMATERIAL)
' End If
' End If
' If Not ParentStructure.SectionList.Contains(Section) Then
' ParentStructure.SectionList.Add(Section)
' End If
' ' Leggo outline
' Dim nOutlineLayerId As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
' Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayerId)
' While nOutlineId <> GDB_ID.NULL
' ' verifico che sia una feature
' Dim nGRP As Integer
' If EgtGetInfo(nOutlineId, BTL_FTR_GRP, nGRP) Then
' ' creo la feature
' m_FeatureList.Add(New BTLFeatureVM(Me, nOutlineId))
' End If
' nOutlineId = EgtGetNext(nOutlineId)
' End While
' ' 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
' m_FeatureList.Add(New BTLFeatureVM(Me, nFeatureId))
' End If
' nFeatureId = EgtGetNext(nFeatureId)
' End While
' ' Aggiorno check DOALL
' NotifyPropertyChanged("bDOALL")
' ' 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(nPartId, ITG_PROJ_ERR, nErr)
' EgtGetInfo(nPartId, ITG_PROJ_ROT, nRot)
' EgtGetInfo(nPartId, ITG_PROJ_FALL, sMsg)
' EgtGetInfo(nPartId, ITG_PROJ_MSG, sMsg)
' CalcPartUpdate(bCalc, nErr, nRot, nFall, sMsg)
' CalcFeatureUpdate()
'End Sub
'Sub New(ParentStructure As BTLStructure, nPartId As Integer)
' m_BTLStructureM = ParentStructure
' Me.SetPartId = nPartId
' m_FeatureList = New ObservableCollection(Of BTLFeature)
'End Sub
'#End Region ' CONSTRUCTOR
'#Region "METHODS"
' Public Event BTLFeatureAdded As EventHandler(Of BTLFeatureAddedEventArgs)
' Public Sub AddBTLFeature(BTLFeatureM As BTLFeatureM)
' If IsNothing(BTLFeatureM) Then Return
' If Not m_BTLFeatureMList.Contains(BTLFeatureM) Then
' m_BTLFeatureMList.Add(BTLFeatureM)
' RaiseEvent BTLFeatureAdded(Me, New BTLFeatureAddedEventArgs(BTLFeatureM))
' End If
' End Sub
' Public Function GetBTLFeatures() As List(Of BTLFeatureM)
' Return New List(Of BTLFeatureM)(m_BTLFeatureMList)
' End Function
' Public Function Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional dAng As Double = 90) As Boolean
' ' recupero il box del pezzo
' Dim nLs As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
' Dim b3Solid As New BBox3d
' EgtGetBBoxGlob(nLs, GDB_BB.STANDARD, b3Solid)
' If b3Solid.IsEmpty() Then
' EgtOutLog("ERROR: Box non definito per la trave " & sNAM)
' Return False
' End If
' ' eseguo rotazione di 90 gradi attorno asse X
' Dim dRot = If(IsPositive, 1, -1) * Math.Abs(dAng)
' Dim vtAxes As Vector3d
' ' se travi ruoto attorno all'asse X
' If SelectedMachineType = MachineType.BEAM Then
' vtAxes = Vector3d.X_AX
' ' se pareti ruoto attorno all'asse Z
' ElseIf SelectedMachineType = MachineType.WALL Then
' vtAxes = -Vector3d.Z_AX
' End If
' ' se invertito
' Dim bInverted As Boolean = nINVERTED <> 0
' If bInverted Then
' ' annullo inversione
' Inversion(SelectedMachineType)
' End If
' ' eseguo rotazione
' Dim bOk As Boolean = EgtRotate(nPartId, b3Solid.Center, vtAxes, dRot, GDB_RT.GLOB)
' If bOk Then
' Dim dNewRotation As Double = (nROTATED + dRot) Mod 360
' nROTATED = If(dNewRotation >= 0, dNewRotation, 360 + dNewRotation)
' EgtSetInfo(nPartId, BTL_PRT_ROTATED, nROTATED)
' ' imposto modificato per copie
' EgtDuploSetModified(nPartId)
' End If
' ' se era invertito
' If bInverted Then
' ' ripristino inversione
' Inversion(SelectedMachineType)
' End If
' EgtDraw()
' Return bOk
' End Function
' Public Sub Inversion(SelectedMachineType As MachineType)
' ' recupero il box del pezzo
' Dim nLs As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
' Dim b3Solid As New BBox3d
' EgtGetBBoxGlob(nLs, GDB_BB.STANDARD, b3Solid)
' If b3Solid.IsEmpty() Then
' EgtOutLog("ERROR: Box non definito per la trave " & sNAM)
' Return
' End If
' Dim vtAxes As Vector3d
' ' se travi ruoto attorno all'asse Z
' If SelectedMachineType = MachineType.BEAM Then
' vtAxes = Vector3d.Z_AX
' ' se pareti ruoto attorno all'asse X
' ElseIf SelectedMachineType = MachineType.WALL Then
' vtAxes = Vector3d.X_AX
' End If
' ' eseguo rotazione di 180 gradi
' If EgtRotate(nPartId, b3Solid.Center, vtAxes, 180, GDB_RT.GLOB) Then
' nINVERTED = If(nINVERTED = 0, 180, 0)
' EgtSetInfo(nPartId, BTL_PRT_INVERTED, nINVERTED)
' ' imposto modificato per copie
' EgtDuploSetModified(nPartId)
' End If
' End Sub
' Public Function NewProcId() As Integer
' Dim nMaxProcId As Integer = 0
' If Not IsNothing(BTLFeatureMList) AndAlso BTLFeatureMList.Count > 0 Then
' nMaxProcId = BTLFeatureMList.Max(Function(x) x.nPRID)
' End If
' Return nMaxProcId + 1
' End Function
#End Region ' METHODS
End Class
+123
View File
@@ -18,6 +18,35 @@ Public Class BTLStructureM
End Get
End Property
Private m_nCompositesId As Integer = GDB_ID.NULL
Public ReadOnly Property nCompositesId As Integer
Get
Return m_nCompositesId
End Get
End Property
' composite di tipo Element da BTL
Public m_BTLElementMList As List(Of BTLElementM)
Public Property BTLElementMList As List(Of BTLElementM)
Get
Return m_BTLElementMList
End Get
Set(value As List(Of BTLElementM))
m_BTLElementMList = value
End Set
End Property
' composite di tipo Layer da BTL
Public m_BTLLayerMList As List(Of BTLLayerM)
Public Property BTLLayerMList As List(Of BTLLayerM)
Get
Return m_BTLLayerMList
End Get
Set(value As List(Of BTLLayerM))
m_BTLLayerMList = value
End Set
End Property
' pezzi da BTL
Public m_BTLPartMList As List(Of BTLPartM)
Public Property BTLPartMList As List(Of BTLPartM)
@@ -406,7 +435,35 @@ Public Class BTLStructureM
Else
NewBTLStructure.m_nAsseBaseId = EgtGetFirstNameInGroup(GDB_ID.ROOT, ASSEBASE)
NewBTLStructure.m_nBTLInfoId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
NewBTLStructure.m_nCompositesId = EgtGetFirstNameInGroup(GDB_ID.ROOT, COMPOSITES)
End If
' cerco tra i Composites se ci sono Element o Layer per vedere se è un progetto Pareti Layer
Dim nCompositesId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, COMPOSITES)
While nCompositesId <> GDB_ID.NULL
' verifico se il layer appartiene al ProjId
Dim nCompositesProjId As Integer
EgtGetInfo(nCompositesId, BTL_PRT_PROJ, nCompositesProjId)
If nCompositesProjId = ProjId Then
NewBTLStructure.m_nCompositesId = nCompositesProjId
Dim nCompositesSubNodeId As Integer = EgtGetFirstInGroup(nCompositesId)
' se Composites presente recupero i Composites di tipo Element e Layer
NewBTLStructure.m_BTLElementMList = LoadElements(nCompositesSubNodeId)
NewBTLStructure.m_BTLLayerMList = LoadLayers(nCompositesSubNodeId)
' aggiungo i Layer già caricati al BTLElement a seconda del GROUP
For Each BTLElementItem In NewBTLStructure.BTLElementMList
BTLElementItem.BTLLayerMList = New List(Of BTLLayerM)
For Each BTLLayerItem In NewBTLStructure.BTLLayerMList
If BTLLayerItem.sGROUP = BTLElementItem.sGROUP Then
' recupero i pezzi associati al Layer
BTLLayerItem.BTLPartMList = LoadLayerParts(BTLLayerItem.nPartId)
BTLElementItem.BTLLayerMList.Add(BTLLayerItem)
End If
Next
Next
Exit While
End If
nCompositesId = EgtGetNextName(nCompositesId, COMPOSITES)
End While
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_PROJNUM, NewBTLStructure.m_sPROJNUM)
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_PROJNAME, NewBTLStructure.m_sPROJNAME)
EgtGetInfo(NewBTLStructure.m_nBTLInfoId, BTL_GEN_PROJPART, NewBTLStructure.m_sPROJPART)
@@ -465,6 +522,56 @@ Public Class BTLStructureM
Return TempList
End Function
Private Shared Function LoadLayerParts(nLayerId As Integer) As List(Of BTLPartM)
Dim TempList As New List(Of BTLPartM)
Dim nSubLayerId As Integer = EgtGetFirstInGroup(nLayerId)
' devo far passare i vari SubLayerId finchè non trovo quelli di UID.
' dentro questi devo trovare !SOU, il valore di questo è il PartId che ci interessa caricare
While nSubLayerId <> GDB_ID.NULL
Dim sSubLayerName As String = ""
Dim nPartId As Integer
EgtGetName(nSubLayerId, sSubLayerName)
If sSubLayerName.Length > 3 AndAlso sSubLayerName.Substring(0, 4) = "UID-" Then
EgtGetInfo(nSubLayerId, "!SOU", nPartId)
If nPartId <> GDB_ID.NULL Then
TempList.Add(BTLPartM.CreateBTLPart(nPartId))
End If
End If
nSubLayerId = EgtGetNext(nSubLayerId)
End While
Return TempList
End Function
Private Shared Function LoadElements(CompositesSubNodeId As Integer) As List(Of BTLElementM)
Dim TempList As New List(Of BTLElementM)
Dim nCompositesSubNodeId As Integer = CompositesSubNodeId
While nCompositesSubNodeId <> GDB_ID.NULL
Dim sCompositeType As String = ""
Dim nTest As Integer = 0
EgtGetInfo(nCompositesSubNodeId, BTL_PRT_TYPE, sCompositeType)
If sCompositeType = "ELEMENT" Then
TempList.Add(BTLElementM.CreateBTLElement(nCompositesSubNodeId))
End If
nCompositesSubNodeId = EgtGetNextGroup(nCompositesSubNodeId)
End While
Return TempList
End Function
Private Shared Function LoadLayers(CompositesSubNodeId As Integer) As List(Of BTLLayerM)
Dim TempList As New List(Of BTLLayerM)
Dim nCompositesSubNodeId As Integer = CompositesSubNodeId
While nCompositesSubNodeId <> GDB_ID.NULL
Dim sCompositeType As String = ""
Dim nTest As Integer = 0
EgtGetInfo(nCompositesSubNodeId, BTL_PRT_TYPE, sCompositeType)
If sCompositeType = "LAYER" Then
TempList.Add(BTLLayerM.CreateBTLLayer(nCompositesSubNodeId))
End If
nCompositesSubNodeId = EgtGetNextGroup(nCompositesSubNodeId)
End While
Return TempList
End Function
#End Region ' CONSTRUCTOR
#Region "METHODS"
@@ -486,6 +593,22 @@ Public Class BTLStructureM
'RaiseEvent BTLPartAdded(Me, New BTLPartAddedEventArgs(BTLPartM))
End Sub
Public Function GetBTLElements() As List(Of BTLElementM)
If Not IsNothing(m_BTLElementMList) Then
Return New List(Of BTLElementM)(m_BTLElementMList)
Else
Return Nothing
End If
End Function
Public Function GetBTLLayers() As List(Of BTLLayerM)
If Not IsNothing(m_BTLLayerMList) Then
Return New List(Of BTLLayerM)(m_BTLLayerMList)
Else
Return Nothing
End If
End Function
Public Function GetBTLParts() As List(Of BTLPartM)
Return New List(Of BTLPartM)(m_BTLPartMList)
End Function
+17 -5
View File
@@ -113,11 +113,18 @@
PROD = 2
End Enum
' Tipo di progetto (Beam o Wall)
Public Enum BWType As Integer
NULL = 0
BEAM = 1
WALL = 2
' Tipo di progetto (Beam o Wall)
Public Enum BWType As Integer
NULL = 0
BEAM = 1
WALL = 2
End Enum
' Tipo di Composite (Element o Layer)
Public Enum CompositeType As Integer
NULL = 0
ELEMENT = 1
LAYER = 2
End Enum
Public Const PROJ As String = "PROJ"
@@ -129,8 +136,13 @@
' info parametri assemblato
Public Const BTL_ASSEBASE_N As String = "N"
Public Const COMPOSITES As String = "Composites"
Public Const ELEMENT As String = "Element"
Public Const LAYER As String = "Layer"
' info parametri BTL
Public Const BTL_PRT_PROJ As String = "PROJ"
Public Const BTL_PRT_TYPE As String = "TYPE"
Public Const BTL_PRT_PDN As String = "PDN"
Public Const BTL_PRT_DO As String = "DO"
Public Const BTL_PRT_NAM As String = "NAM"
+1
View File
@@ -6,6 +6,7 @@
Public Const PROJECT_OPTIMIZER As String = "Project_Optimizer"
Public Const LEFTPANEL_VIEW As String = "LeftPanel_View"
Public Const LEFTPANEL_OPTIMIZER As String = "LeftPanel_Optimizer"
Public Const LEFTPANEL_LAYERSWALL As String = "LeftPanel_LayersWall"
Public Const TOPPANEL_OPTIMIZER As String = "TopPanel_Optimizer"
Public Const LEFTPANEL_SUPERVISOR As String = "LeftPanel_Supervisor"
Public Const PROJECT_SUPERVISOR As String = "Project_Supervisor"
+1
View File
@@ -32,6 +32,7 @@ Public Module ConstGen
CONFIG = 3
INPUTS = 4
OUTPUTS = 5
LAYERSWALL = 6
End Enum
' Abilitazioni licenza
+2
View File
@@ -79,6 +79,8 @@
<Import Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="BTLModel\BTLLayerM.vb" />
<Compile Include="BTLModel\BTLElementM.vb" />
<Compile Include="BTLViewModel\BTLFeatureVM.vb" />
<Compile Include="CALCPanel\CalcEditEndEventArgs.vb" />
<Compile Include="Constants\ConstColumns.vb" />
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1500,6 +1500,21 @@ Public Class BTLPartVM
EgtDeselectAll()
End If
Map.refLeftPanelVM.FeatureSelectionChanged()
ElseIf Map.refMainMenuVM.SelPage = Pages.LAYERSWALL Then
If Not IsNothing(m_SelBTLFeatureVM) Then
DirectCast(m_SelBTLFeatureVM, BTLFeatureVM).SelGeomFeature()
' imposto path disegno da mostrare in BottomPanel
Map.refLayersWallBottomPanelVM.SetCurrDraw(DirectCast(m_SelBTLFeatureVM, BTLFeatureVM).sDrawPath)
' seleziono pagina BottomPanel
Map.refLayersWallBottomPanelVM.SetSelPartFeatureTab(LayersWallBottomPanelVM.PartFeatureTab.FEATURE)
' deseleziono i parametri
If Not IsNothing(SelBTLFeatureVM.SelPBTLParam) Then SelBTLFeatureVM.SelPBTLParam = Nothing
' rinfresco bottoni freecontour
m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
Else
EgtDeselectAll()
End If
Map.refLayersWallLeftPanelVM.FeatureSelectionChanged()
End If
EgtDraw()
NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
@@ -1548,8 +1563,10 @@ Public Class BTLPartVM
CreateBTLFeatureVMList()
m_BTLFeatureVMList_ViewSource = New CollectionViewSource With {.Source = m_BTLFeatureVMList}
m_BTLFeatureVMList_View = m_BTLFeatureVMList_ViewSource.View
m_BTLFeatureVMList_View.CustomSort = New FeatureSorter
m_BTLFeatureVMList_View.Filter = AddressOf FeatureFilter
If Not IsNothing(m_BTLFeatureVMList_View) Then
m_BTLFeatureVMList_View.CustomSort = New FeatureSorter
m_BTLFeatureVMList_View.Filter = AddressOf FeatureFilter
End If
' Aggiorno check DOALL
NotifyPropertyChanged(NameOf(bDOALL))
' Aggiorno stato da stati feature
@@ -1576,7 +1593,7 @@ Public Class BTLPartVM
#Region "METHODS"
Private Sub CreateBTLFeatureVMList()
Protected Overridable Sub CreateBTLFeatureVMList()
Dim all As List(Of BTLFeatureVM) = (From BTLFeatureM In m_BTLPartM.GetBTLFeatures()
Select New BTLFeatureVM(BTLFeatureM, m_BTLPartM)).ToList()
@@ -2071,12 +2088,12 @@ Public Class BTLPartVM
#Region "EVENTS"
Private Sub OnBTLFeatureAdded(sender As Object, e As BTLFeatureAddedEventArgs)
Protected Sub OnBTLFeatureAdded(sender As Object, e As BTLFeatureAddedEventArgs)
Dim BTLFeatureVM As BTLFeatureVM = New BTLFeatureVM(e.NewBTLFeature, m_BTLPartM)
BTLFeatureVMList.Add(BTLFeatureVM)
End Sub
Private Sub OnBTLFeatureVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
Protected 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
@@ -20,6 +20,136 @@ Public Class BTLStructureVM
End Get
End Property
' pezzi da BTL
Private m_BTLElementVMList_View As CollectionView = Nothing
Private m_BTLElementVMList As ObservableCollection(Of BTLElementVM)
Public Property BTLElementVMList As ObservableCollection(Of BTLElementVM)
Get
Return m_BTLElementVMList
End Get
Set(value As ObservableCollection(Of BTLElementVM))
m_BTLElementVMList = value
End Set
End Property
' pezzi da BTL
Private m_BTLLayerVMList_View As CollectionView = Nothing
Private m_BTLLayerVMList As ObservableCollection(Of BTLLayerVM)
Public Property BTLLayerVMList As ObservableCollection(Of BTLLayerVM)
Get
Return m_BTLLayerVMList
End Get
Set(value As ObservableCollection(Of BTLLayerVM))
m_BTLLayerVMList = value
End Set
End Property
Private m_SelBTLLayer As BTLLayerVM = Nothing
Public Property SelBTLLayer As BTLLayerVM
Get
Return m_SelBTLLayer
End Get
Set(value As BTLLayerVM)
If Not IsNothing(m_SelBTLLayer) Then
' se necessario tolgo solido dal precedentemente selezionato
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
Map.refShowBeamPanelVM.SetShowSolid(False)
End If
' disabilito eventuale feature selezionata
If Not IsNothing(m_SelBTLLayer.m_SelBTLFeatureVM) Then m_SelBTLLayer.SelBTLFeatureVM = Nothing
End If
m_SelBTLLayer = value
' se seleziono un layer
If Not IsNothing(m_SelBTLLayer) Then
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
ShowBuilding(False, False)
End If
' seleziono pezzo nella scena
SceneSelPartSelection()
' seleziono pezzo in Db geometrico
EgtBeamSetPart(m_SelBTLLayer.nPartId)
' seleziono pagina BottomPanel
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART)
' mostro barra di gestione pezzo
Map.refProjectVM.SetPartManager_Visibility(True)
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
' deseleziono le feature
If Not IsNothing(m_SelBTLLayer.SelBTLFeatureVM) Then SelBTLLayer.SelBTLFeatureVM = Nothing
' aggiorno stato selezionato tutto
Map.refShowBeamPanelVM.bShowAll = False
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL)
ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING Then
' resetto gruppo di lavorazione corrente
EgtResetCurrMachGroup()
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
Dim MachGroupList As New List(Of MyMachGroupVM)
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
Dim bFound As Boolean = False
For Each Layer As PartVM In Machgroup.PartVMList
If EgtDuploGetOriginal(Layer.nPartId) = m_SelBTLLayer.nPartId Then
Layer.SetSearchFound()
bFound = True
Else
Layer.ResetSearchFound()
End If
Next
If bFound Then
Machgroup.SetSearchFound()
Else
Machgroup.ResetSearchFound()
End If
Next
End If
' seleziono pezzo nella scena
SceneSelPartSelection()
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL)
ElseIf Map.refMainMenuVM.SelPage = Pages.LAYERSWALL Then
' se c'era un Part selezionato lo deseleziono
SelBTLLayer.SelBTLPart = Nothing
' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
ShowBuilding(False, False)
End If
' seleziono pezzo nella scena
SceneSelPartSelection()
' seleziono pezzo in Db geometrico
EgtBeamSetPart(m_SelBTLLayer.nPartId)
' mostro tutti i pezzi
Map.refShowBeamPanelVM.ShowAll(True)
' seleziono pagina LayersWallBottomPanel
Map.refLayersWallBottomPanelVM.SetSelPartFeatureTab(LayersWallBottomPanelVM.PartFeatureTab.LAYER)
' mostro barra di gestione pezzo
Map.refProjectVM.SetLayersWallLayerPartManager_Visibility(True)
' deseleziono le feature
If Not IsNothing(m_SelBTLLayer.SelBTLFeatureVM) Then SelBTLLayer.SelBTLFeatureVM = Nothing
If Not IsNothing(m_SelBTLLayer.SelBTLPart) AndAlso Not IsNothing(m_SelBTLLayer.SelBTLPart.SelBTLFeatureVM) Then SelBTLLayer.SelBTLPart.SelBTLFeatureVM = Nothing
' aggiorno FeatureList, FeatureManager e Parametri P e Q da far vedere
Map.refFeatureListVM.SetLayerFeatureList_Visibility(True)
Map.refFeatureListVM.SetPartFeatureList_Visibility(False)
Map.refFeatureManagerVM.SetLayerFeature_Visibility(True)
Map.refFeatureManagerVM.SetPartFeature_Visibility(False)
Map.refLayersWallBottomPanelVM.SetLayerFeature_Visibility(True)
Map.refLayersWallBottomPanelVM.SetPartFeature_Visibility(False)
' aggiorno stato selezionato tutto
Map.refShowBeamPanelVM.bShowAll = False
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL)
End If
End If
NotifyPropertyChanged(NameOf(SelBTLLayer))
End Set
End Property
' funzione che imposta layer BTL selezionato senza aggiornare nulla
Friend Sub SetSelBTLLayer(BTLLayer As BTLLayerVM)
m_SelBTLLayer = BTLLayer
NotifyPropertyChanged(NameOf(SelBTLLayer))
End Sub
' pezzi da BTL
Private m_BTLPartVMList_View As CollectionView = Nothing
Private m_BTLPartVMList As ObservableCollection(Of BTLPartVM)
@@ -60,9 +190,9 @@ Public Class BTLStructureVM
EgtBeamSetPart(m_SelBTLPart.nPartId)
' seleziono pagina BottomPanel
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART)
' mostro barra di gestione pezzo
Map.refProjectVM.SetPartManager_Visibility(True)
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
'' mostro barra di gestione pezzo
'Map.refProjectVM.SetPartManager_Visibility(True)
'Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
' deseleziono le feature
If Not IsNothing(m_SelBTLPart.SelBTLFeatureVM) Then SelBTLPart.SelBTLFeatureVM = Nothing
' aggiorno stato selezionato tutto
@@ -96,6 +226,26 @@ Public Class BTLStructureVM
SceneSelPartSelection()
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL)
ElseIf Map.refMainMenuVM.SelPage = Pages.LAYERSWALL Then
' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
ShowBuilding(False, False)
End If
' seleziono pezzo nella scena
SceneSelPartSelection()
' seleziono pezzo in Db geometrico
EgtBeamSetPart(m_SelBTLPart.nPartId)
' seleziono pagina BottomPanel
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART)
' mostro barra di gestione pezzo
Map.refProjectVM.SetPartManager_Visibility(True)
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
' deseleziono le feature
If Not IsNothing(m_SelBTLPart.SelBTLFeatureVM) Then SelBTLPart.SelBTLFeatureVM = Nothing
' aggiorno stato selezionato tutto
Map.refShowBeamPanelVM.bShowAll = False
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
EgtZoom(ZM.ALL)
End If
End If
NotifyPropertyChanged(NameOf(SelBTLPart))
@@ -311,6 +461,8 @@ Public Class BTLStructureVM
Return Map.refProjManagerVM.nProjType
Case Pages.MACHINING
Return Map.refProdManagerVM.nProdType
Case Pages.LAYERSWALL
Return Map.refProjManagerVM.nProjType
Case Else
Return BWType.NULL
End Select
@@ -641,8 +793,24 @@ Public Class BTLStructureVM
Sub New(BTLStructureM As BTLStructureM)
m_BTLStructureM = BTLStructureM
AddHandler m_BTLStructureM.BTLPartAdded, AddressOf OnBTLPartAdded
CreateBTLElementVMList()
' creo lista di BTLLayerVM
CreateBTLLayerVMList()
If Not IsNothing(BTLElementVMList) Then
For Each BTLElementVMItem In BTLElementVMList
BTLElementVMItem.m_BTLLayerVMList = New ObservableCollection(Of BTLLayerVM)
For Each BTLLayerVMItem In BTLLayerVMList
If Not IsNothing(BTLElementVMItem.BTLElementM.sGROUP) AndAlso
Not IsNothing(BTLLayerVMItem.BTLLayerM.sGROUP) AndAlso
BTLElementVMItem.BTLElementM.sGROUP = BTLLayerVMItem.BTLLayerM.sGROUP Then
BTLElementVMItem.m_BTLLayerVMList.Add(BTLLayerVMItem)
End If
Next
Next
End If
' creo lista di BTLPartVM
CreateBTLPartVMList()
m_BTLPartVMList = Me.m_BTLPartVMList
m_BTLPartVMList_View = CollectionViewSource.GetDefaultView(m_BTLPartVMList)
m_GroupList_View = CollectionViewSource.GetDefaultView(m_GroupList)
m_SubGroupList_View = CollectionViewSource.GetDefaultView(m_SubGroupList)
@@ -664,6 +832,32 @@ Public Class BTLStructureVM
#Region "METHODS"
Private Sub CreateBTLElementVMList()
If IsNothing(m_BTLStructureM.GetBTLElements()) Then Return
Dim all As List(Of BTLElementVM) = (From BTLElementM In m_BTLStructureM.GetBTLElements()
Select New BTLElementVM(BTLElementM, m_BTLStructureM)).ToList()
'For Each BTLElementVM As BTLElementVM In all
' AddHandler BTLElementVM.PropertyChanged, AddressOf OnBTLElementVMPropertyChanged
'Next
m_BTLElementVMList = New ObservableCollection(Of BTLElementVM)(all)
'AddHandler m_BTLElementVMList.CollectionChanged, AddressOf OnBTLElementVMListChanged
End Sub
Private Sub CreateBTLLayerVMList()
If IsNothing(m_BTLStructureM.GetBTLLayers()) Then Return
Dim all As List(Of BTLLayerVM) = (From BTLLayerM In m_BTLStructureM.GetBTLLayers()
Select New BTLLayerVM(BTLLayerM, m_BTLStructureM)).ToList()
'For Each BTLLayerVM As BTLLayerVM In all
' AddHandler BTLLayerVM.PropertyChanged, AddressOf OnBTLLayerVMPropertyChanged
'Next
m_BTLLayerVMList = New ObservableCollection(Of BTLLayerVM)(all)
'AddHandler m_BTLLayerVMList.CollectionChanged, AddressOf OnBTLLayerVMListChanged
End Sub
Private Sub CreateBTLPartVMList()
Dim all As List(Of BTLPartVM) = (From BTLPartM In m_BTLStructureM.GetBTLParts()
Select New BTLPartVM(BTLPartM, m_BTLStructureM)).ToList()
@@ -703,14 +897,14 @@ Public Class BTLStructureVM
Next
End Sub
Private Sub SceneSelPartSelection()
Friend Sub SceneSelPartSelection()
' deseleziono tutto
EgtDeselectAll()
' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr
' ciclo sui pezzi
For Each Part As BTLPartVM In m_BTLPartVMList
' se non è quello selezionato, lo nasondo
' se non è quello selezionato, lo nascondo
If Part IsNot m_SelBTLPart Then
EgtSetMode(Part.nPartId, GDB_MD.HIDDEN)
Else
@@ -721,6 +915,26 @@ Public Class BTLStructureVM
DisableMgr.ReEnable()
End Sub
Friend Sub SceneSelPartInLayerSelection()
' deseleziono tutto
EgtDeselectAll()
' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr
' ciclo sui pezzi
If Not IsNothing(m_SelBTLLayer.SelBTLPart) Then
For Each Part As BTLPartVM In m_SelBTLLayer.BTLPartVMList
' se non è quello selezionato, lo nascondo
If Not Part.nPartId = m_SelBTLLayer.SelBTLPart.nPartId Then
EgtSetMode(Part.nPartId, GDB_MD.HIDDEN)
Else
EgtSetMode(Part.nPartId, GDB_MD.STD)
End If
Next
End If
' ripristino precedente impostazione modificato
DisableMgr.ReEnable()
End Sub
Friend Sub ShowAll(Optional bRedraw As Boolean = True)
' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr
@@ -741,7 +955,7 @@ Public Class BTLStructureVM
BTLPartIdList.Sort()
Dim nGeomPartId As Integer = EgtGetFirstPart()
While nGeomPartId <> GDB_ID.NULL
Dim CurrPart As BTLPartVM = BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nGeomPartId)
Dim CurrPart As BTLPartVM = If(Not IsNothing(SelBTLLayer), SelBTLLayer.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nGeomPartId), BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nGeomPartId))
If Not IsNothing(CurrPart) Then
Dim nMode As Integer
EgtGetMode(CurrPart.nPartId, nMode)
@@ -165,10 +165,28 @@
<Compile Include="AboutBoxWindow\AboutBoxV.xaml.vb">
<DependentUpon>AboutBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="LayersWallBottomPanel\LayersWallBottomPanelV.xaml.vb">
<DependentUpon>LayersWallBottomPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="LayersWallBottomPanel\LayersWallBottomPanelVM.vb" />
<Compile Include="BTLViewModel\BTLLayerVM.vb" />
<Compile Include="BTLViewModel\BTLElementVM.vb" />
<Compile Include="ChangeMaterialWnd\ChangeMaterialWndV.xaml.vb">
<DependentUpon>ChangeMaterialWndV.xaml</DependentUpon>
</Compile>
<Compile Include="ChangeMaterialWnd\ChangeMaterialWndVM.vb" />
<Compile Include="ElementLayerTreeView\ElementLayerTreeView.vb" />
<Compile Include="ElementLayerTreeView\ElementLayerTreeViewV.xaml.vb">
<DependentUpon>ElementLayerTreeViewV.xaml</DependentUpon>
</Compile>
<Compile Include="ElementLayerTreeView\ElementLayerTreeViewVM.vb" />
<Compile Include="LayersWallFeatureList\LayersWallFeatureListV.xaml.vb">
<DependentUpon>LayersWallFeatureListV.xaml</DependentUpon>
</Compile>
<Compile Include="LayersWallLeftPanel\LayersWallLeftPanelV.xaml.vb">
<DependentUpon>LayersWallLeftPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="LayersWallLeftPanel\LayersWallLeftPanelVM.vb" />
<Compile Include="MovePartInRawPartWnd\MovePartInRawPartWndV.xaml.vb">
<DependentUpon>MovePartInRawPartWndV.xaml</DependentUpon>
</Compile>
@@ -233,11 +251,19 @@
<DependentUpon>NestingRunningWndV.xaml</DependentUpon>
</Compile>
<Compile Include="NestingRunningWnd\NestingRunningWndVM.vb" />
<Compile Include="LayersWallPartManager\LayersWallPartManagerV.xaml.vb">
<DependentUpon>LayersWallPartManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="LayersWallPartManager\LayersWallPartManagerVM.vb" />
<Compile Include="ProjectTypeWnd\ProjectTypeWndV.xaml.vb">
<DependentUpon>ProjectTypeWndV.xaml</DependentUpon>
</Compile>
<Compile Include="ProjectTypeWnd\ProjectTypeWndVM.vb" />
<Compile Include="ProjectFileVM\ProdFileVM.vb" />
<Compile Include="LayersWallProjManager\LayersWallProjManagerV.xaml.vb">
<DependentUpon>LayersWallProjManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="LayersWallProjManager\LayersWallProjManagerVM.vb" />
<Compile Include="SetUp\SetUpSupportClass.vb" />
<Compile Include="SetUp\SetUpV.xaml.vb">
<DependentUpon>SetUpV.xaml</DependentUpon>
@@ -368,10 +394,26 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LayersWallBottomPanel\LayersWallBottomPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ChangeMaterialWnd\ChangeMaterialWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ElementLayerTreeView\ElementLayerTreeViewV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LayersWallFeatureList\LayersWallFeatureListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="LayersWallLeftPanel\LayersWallLeftPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MovePartInRawPartWnd\MovePartInRawPartWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -436,10 +478,18 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LayersWallPartManager\LayersWallPartManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ProjectTypeWnd\ProjectTypeWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="LayersWallProjManager\LayersWallProjManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SetUp\SetUpV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -0,0 +1,123 @@
Imports EgtUILib
''' <summary>
''' Class that represent a Machining in the treeview.
''' It's an element in the treeview that represent the child of familymachiningtreeviewitem, but also the class that read and write in the machining's database
''' </summary>
Public Class ElementLayerTreeViewItem
Inherits ChildItem
#Region "Machining Property"
Private m_Type As MCH_MY
Public ReadOnly Property Type As Integer
Get
Return m_Type
End Get
End Property
''' <summary>
''' Property that determines if the Machining is selected or not
''' </summary>
Public Overrides Property IsSelected As Boolean
Get
Return m_isSelected
End Get
Set(value As Boolean)
If (value <> m_isSelected) Then
m_isSelected = value
' If Machining is selected, set it as current and notify all machining's property
' to refresh them values with those of the new selected machining
If value Then
EgtMdbSetCurrMachining(Me.Name)
Else
End If
End If
End Set
End Property
Private m_Tool As String
Public Property Tool As String
Get
Return m_Tool
End Get
Set(value As String)
m_Tool = value
End Set
End Property
#End Region ' Machining Property
#Region "Constructors"
Sub New(Name As String, Tool As String)
MyBase.New(Name)
Me.Tool = If(Not String.IsNullOrEmpty(Tool), "(" & Tool & ")", String.Empty)
End Sub
#End Region ' Constructors
End Class
''' <summary>
''' Class that represent a FamilyMachining in the treeview.
''' It's an element in the treeview that represent a folder, but also a machining family
''' </summary>
Public Class FamilyElementLayerTreeViewItem
Inherits ParentItem
Private m_MachiningType As MCH_MY
''' <summary>
''' Property that determines the machining type of the family
''' </summary>
Public Property MachiningType As MCH_MY
Get
Return m_MachiningType
End Get
Set(value As MCH_MY)
m_MachiningType = value
End Set
End Property
''' <summary>
''' Property that determines if the Machining is selected or not
''' </summary>
Public Overrides Property IsSelected As Boolean
Get
Return m_isSelected
End Get
Set(value As Boolean)
If (value <> m_isSelected) Then
m_isSelected = value
End If
End Set
End Property
Public ReadOnly Property sName As String
Get
Return "Prova"
End Get
End Property
''' <summary>
''' Constructor that receive the name of the FamilyMachiningTreeViewItem, the MachiningType, and set
''' the picture(Folder.png)
''' </summary>
Sub New(Name As String)
MyBase.New(Name)
Me.PictureString = "/Resources/TreeView/Folder.png"
End Sub
End Class
Public Class Element
End Class
Public Class Layer
End Class
@@ -0,0 +1,78 @@
<UserControl x:Class="ElementLayerTreeViewV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:local="clr-namespace:EgtBEAMWALL.ViewerOptimizer">
<UniformGrid MaxHeight="300">
<TreeView Name="ElementLayersTreeView" Grid.Row="1"
ItemsSource="{Binding Tag.BTLElementVMList,
RelativeSource={RelativeSource AncestorType={x:Type local:ElementLayerTreeViewV}}}">
<!--ItemsSource="{Binding Path=ElementLayersList}">-->
<!--<interactivity:Interaction.Triggers>
<interactivity:EventTrigger EventName="MouseDoubleClick">
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}" CommandParameter="{Binding ElementName=MachiningsTreeView,Path=SelectedItem}"/>
</interactivity:EventTrigger>
</interactivity:Interaction.Triggers>-->
<!--<TreeView.InputBindings>
<KeyBinding Key="Escape" Command="{Binding CancelNewCommand}" CommandParameter="Escape"/>
</TreeView.InputBindings>-->
<TreeView.Resources>
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
<!--renderlo apribile con un solo click -->
<HierarchicalDataTemplate DataType="{x:Type local:BTLElementVM}" ItemsSource="{Binding BTLLayerVMList}">
<!--<HierarchicalDataTemplate DataType="{x:Type local:FamilyElementLayerTreeViewItem}" ItemsSource="{Binding Items}">-->
<!--<HierarchicalDataTemplate DataType="{x:Type local:FamilyElementLayerTreeViewItem}" ItemsSource="{Binding ElementLayersList}">-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="1" Text="{Binding sNAMplus}"/>
</Grid>
<!--Assegna ai nodi ToolItem lo Style normale dei TreeViewItem, eliminando l'ombra, data dal
multibinding quando sono attivi.-->
<HierarchicalDataTemplate.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}" >
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</Style>
</HierarchicalDataTemplate.ItemContainerStyle>
</HierarchicalDataTemplate>
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
<DataTemplate DataType="{x:Type local:BTLLayerVM}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding sNAMplus}" Margin="0,0,5,0"/>
<!--<TextBlock Grid.Column="1" Text="{Binding Tool}"/>-->
</Grid>
</DataTemplate>
</TreeView.Resources>
<!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia -->
<!--che si presenta quando la categoria rimane vuota (ombra causata dal multibinding). -->
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<EventSetter Event="PreviewMouseDown" Handler="ElementLayerTreeView_PreviewMouseDown"/>
<EventSetter Event="PreviewMouseUp" Handler="ElementLayerTreeView_PreviewMouseUp"/>
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
</UniformGrid>
</UserControl>
@@ -0,0 +1,28 @@
Public Class ElementLayerTreeViewV
Dim nPrevPartId As Integer = 0
Private Sub ElementLayerTreeView_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
' se ci troviamo nella pagina LayersWall e un Layer è già selezionato
If Map.refMainMenuVM.SelPage = EgtBEAMWALL.Core.ConstGen.Pages.LAYERSWALL AndAlso
Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLLayer) AndAlso
Map.refProjectVM.BTLStructureVM.SelBTLLayer.IsSelected Then
' salvo il PartId dell'elemento che era già selezionato
nPrevPartId = Map.refProjectVM.BTLStructureVM.SelBTLLayer.nPartId
End If
End Sub
Private Sub ElementLayerTreeView_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs)
' se ci troviamo nella pagina LayersWall e un Layer è già selezionato
If Map.refMainMenuVM.SelPage = EgtBEAMWALL.Core.ConstGen.Pages.LAYERSWALL AndAlso
Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLLayer) AndAlso
Map.refProjectVM.BTLStructureVM.SelBTLLayer.IsSelected Then
' se l'elemento su cui ho clickato è lo stesso che era selezionato
If Map.refProjectVM.BTLStructureVM.SelBTLLayer.nPartId = nPrevPartId Then
' riassegno SelBTLLayer a se stesso per eseguire la riselezione di se stesso
Map.refProjectVM.BTLStructureVM.SelBTLLayer = Map.refProjectVM.BTLStructureVM.SelBTLLayer
End If
End If
End Sub
End Class
@@ -0,0 +1,156 @@
Imports System.Collections.ObjectModel
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Public Class ElementLayerTreeViewVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend CodeCommand As Boolean = False
Private m_IsEnabled As Boolean
Public Property IsEnabled As Boolean
Get
Return m_IsEnabled
End Get
Set(value As Boolean)
If value <> m_IsEnabled Then
'Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.NEWMACHININGS, value)
End If
End Set
End Property
' Lista delle lavorazioni
Private m_ElementLayersList As New ObservableCollection(Of FamilyElementLayerTreeViewItem)
Public Property ElementLayersList As ObservableCollection(Of FamilyElementLayerTreeViewItem)
Get
Return m_ElementLayersList
End Get
Set(value As ObservableCollection(Of FamilyElementLayerTreeViewItem))
m_ElementLayersList = value
End Set
End Property
Public ReadOnly Property LayersWallPage_Visibility As Visibility
Get
Return If(Map.refMainMenuVM.SelPage = Pages.LAYERSWALL, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
' Operazione correntemente selezionata, che permette di aggiungere al posto giusto quella nuova
Friend nSelectedOperationId As Integer = GDB_ID.NULL
'Public ReadOnly Property MachListHdr As String
' Get
' Return EgtMsg(MSG_OPERATION + 12) ' Nuove Lavorazioni
' End Get
'End Property
' Definizione comandi
Private m_cmdTreeViewDoubleClick As ICommand
Private m_cmdCancelNew As ICommand
#End Region
#Region "CONSTRUCTOR"
Sub New()
Map.SetRefElementLayerTreeViewVM(Me)
' Per caricare l'albero la prima volta che viene aperto
IsEnabled = False
'LoadSelectedMachineMachinings()
End Sub
#End Region
#Region "COMMANDS"
#End Region ' Commands
#Region "METHODS"
Friend Function InitMachiningTreeExpander() As Boolean
'm_IsEnabled = True
'Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = False
'Map.refSimulationExpanderVM.Simulation_IsEnabled = False
'Map.refEstimationsExpanderVM.Estimation_IsEnabled = False
'' Abilito la selezione delle geometrie di lavorazione
'Map.refProjectVM.SceneSelType = SceneSelTypeOpt.MACHINING
'' Abilito la selezione di curve e superfici del pezzo
'Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
'CodeCommand = False
'OnPropertyChanged("IsEnabled")
Return True
End Function
Friend Function ExitMachiningTreeExpander() As Boolean
'm_IsEnabled = False
'Map.refOperationParametersExpanderVM.OperParamsViewIsEnabled = True
'Map.refSimulationExpanderVM.Simulation_IsEnabled = True
'Map.refEstimationsExpanderVM.Estimation_IsEnabled = True
'If Not CodeCommand Then
' Map.refOperationsListExpanderVM.CancelOperationCmd()
' CodeCommand = False
' OnPropertyChanged("IsEnabled")
' Return False
'End If
'CodeCommand = False
'OnPropertyChanged("IsEnabled")
Return True
End Function
''' <summary>
''' Method that search the machines in the correct folder and add to the MachinesList those valid.
''' </summary>
Private Sub LoadSelectedMachineMachinings()
'Dim ActiveMachiningsTypes() As MachiningsType = MachineModel.ReadActiveMachiningsFamilies()
'For Each MachiningsType In ActiveMachiningsTypes
' Dim FamilyTreeView As New FamilyMachiningTreeViewExpanderItem(MachiningsType.TypeName, MachiningsType.TypeId)
' MachiningsList.Add(FamilyTreeView)
' Dim MachiningName As String = String.Empty
' Dim MachiningToolName As String = String.Empty
' EgtMdbGetFirstMachining(MachiningsType.TypeId, MachiningName)
' While Not String.IsNullOrEmpty(MachiningName)
' EgtMdbSetCurrMachining(MachiningName)
' EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, MachiningToolName)
' FamilyTreeView.Items.Add(New MachiningTreeViewExpanderItem(MachiningName, MachiningsType.TypeId, MachiningToolName))
' EgtMdbGetNextMachining(MachiningsType.TypeId, MachiningName)
' End While
'Next
'' Se esiste almeno una famiglia di lavorazioni, la seleziono
'If MachiningsList.Count > 0 Then
' MachiningsList(0).IsSelected = True
' MachiningsList(0).NotifyPropertyChanged("IsSelected")
'End If
Dim ActiveMachiningsTypes() As String = {"A", "B", "C"}
For Each MachiningsType In ActiveMachiningsTypes
Dim FamilyTreeView As New FamilyElementLayerTreeViewItem(MachiningsType)
ElementLayersList.Add(FamilyTreeView)
Dim MachiningName As String = "1"
FamilyTreeView.Items.Add(New ElementLayerTreeViewItem(MachiningName, MachiningsType))
Next
' Se esiste almeno una famiglia di lavorazioni, la seleziono
If ElementLayersList.Count > 0 Then
ElementLayersList(0).IsSelected = True
ElementLayersList(0).NotifyPropertyChanged("IsSelected")
End If
End Sub
Friend Sub UpdateOperationMachiningList()
m_ElementLayersList.Clear()
LoadSelectedMachineMachinings()
End Sub
#End Region
End Class
@@ -16,6 +16,34 @@ Public Class FeatureManagerVM
End Set
End Property
Private m_LayerFeature_Visibility As Boolean = False
Public Property LayerFeature_Visibility As Visibility
Get
Return If(m_LayerFeature_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_LayerFeature_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetLayerFeature_Visibility(IsVisible As Boolean)
m_LayerFeature_Visibility = IsVisible
NotifyPropertyChanged(NameOf(LayerFeature_Visibility))
End Sub
Private m_PartFeature_Visibility As Boolean = False
Public Property PartFeature_Visibility As Visibility
Get
Return If(m_PartFeature_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_PartFeature_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetPartFeature_Visibility(IsVisible As Boolean)
m_PartFeature_Visibility = IsVisible
NotifyPropertyChanged(NameOf(PartFeature_Visibility))
End Sub
#Region "Messages"
Public ReadOnly Property Face_Msg As String
@@ -4,7 +4,11 @@
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
If Not IsNothing(Row) AndAlso Row.IsSelected Then
Map.refProjectVM.BTLStructureVM.SelBTLPart = Map.refProjectVM.BTLStructureVM.SelBTLPart
If Map.refMainMenuVM.SelPage = EgtBEAMWALL.Core.ConstGen.Pages.LAYERSWALL Then
Map.refProjectVM.BTLStructureVM.SelBTLLayer.SelBTLPart = Map.refProjectVM.BTLStructureVM.SelBTLLayer.SelBTLPart
Else
Map.refProjectVM.BTLStructureVM.SelBTLPart = Map.refProjectVM.BTLStructureVM.SelBTLPart
End If
End If
End If
End Sub
@@ -1,8 +1,10 @@
Imports System.Collections.ObjectModel
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Public Class BTLPartListVM
Inherits VMBase
Private m_colPart_Do As EgtDataGridColumn
Public ReadOnly Property colPart_Do As EgtDataGridColumn
@@ -21,6 +23,18 @@ Public Class BTLPartListVM
End Set
End Property
Public ReadOnly Property ViewMachiningPage_Visibility As Visibility
Get
Return If(Map.refMainMenuVM.SelPage = Pages.VIEW Or Map.refMainMenuVM.SelPage = Pages.MACHINING, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Public ReadOnly Property LayersWallPage_Visibility As Visibility
Get
Return If(Map.refMainMenuVM.SelPage = Pages.LAYERSWALL, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#Region "Messages"
Public ReadOnly Property PDN_Msg As String
@@ -4,6 +4,7 @@ Imports EgtUILib
Imports EgtWPFLib5
Public Class FeatureListVM
Inherits VMBase
Private m_colFeature_Do As EgtDataGridColumn
Public ReadOnly Property colFeature_Do As EgtDataGridColumn
@@ -22,6 +23,34 @@ Public Class FeatureListVM
End Set
End Property
Private m_LayerFeatureList_Visibility As Boolean = True
Public Property LayerFeatureList_Visibility As Visibility
Get
Return If(m_LayerFeatureList_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_LayerFeatureList_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetLayerFeatureList_Visibility(IsVisible As Boolean)
m_LayerFeatureList_Visibility = IsVisible
NotifyPropertyChanged(NameOf(LayerFeatureList_Visibility))
End Sub
Private m_PartFeatureList_Visibility As Boolean = True
Public Property PartFeatureList_Visibility As Visibility
Get
Return If(m_PartFeatureList_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_PartFeatureList_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetPartFeatureList_Visibility(IsVisible As Boolean)
m_PartFeatureList_Visibility = IsVisible
NotifyPropertyChanged(NameOf(PartFeatureList_Visibility))
End Sub
#Region "Messages"
Public ReadOnly Property Description_Msg As String
@@ -0,0 +1,170 @@
<Grid x:Class="LayersWallBottomPanelV"
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.ViewerOptimizer"
Height="350"
Visibility="{Binding LayersWallBottomPanel_Visibility}">
<!--<EgtWPFLib5:EgtScrollViewer Focusable="False">-->
<TabControl SelectedIndex="{Binding SelPartFeatureTab}"
TabStripPlacement="Right"
Margin="5">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="STRUCTURE">
<TabItem.Content>
<EgtWPFLib5:EgtScrollViewer Focusable="False">
<EgtBEAMWALL:BTLDataV DataContext="{StaticResource BTLDataWndVM}"
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5"/>
</EgtWPFLib5:EgtScrollViewer>
</TabItem.Content>
</TabItem>
<TabItem Header="LAYER">
<TabItem.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<EgtWPFLib5:EgtScrollViewer Focusable="False">
<EgtBEAMWALL:PartParametersV DataContext="{StaticResource PartParametersVM}"
Tag="{Binding Tag.SelBTLLayer, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5"/>
</EgtWPFLib5:EgtScrollViewer>
<TextBlock Grid.Row="1"
Text="{Binding Tag.SelBTLLayer.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Foreground="{Binding Tag.SelBTLLayer.CALC_ERR_Foreground, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5,0,5,0"
Visibility="{Binding Tag.SelBTLLayer.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"/>
</Grid>
</TabItem.Content>
</TabItem>
<TabItem Header="PART">
<TabItem.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<EgtWPFLib5:EgtScrollViewer Focusable="False">
<EgtBEAMWALL:PartParametersV DataContext="{StaticResource PartParametersVM}"
Tag="{Binding Tag.SelBTLLayer.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5"/>
</EgtWPFLib5:EgtScrollViewer>
<TextBlock Grid.Row="1"
Text="{Binding Tag.SelBTLLayer.SelBTLPart.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Foreground="{Binding Tag.SelBTLLayer.SelBTLPart.CALC_ERR_Foreground, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5,0,5,0"
Visibility="{Binding Tag.SelBTLLayer.SelBTLPart.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"/>
</Grid>
</TabItem.Content>
</TabItem>
<TabItem Header="FEATURE">
<TabItem.Content>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="TextBlock">
<Style.Triggers>
<Trigger Property="Text" Value="">
<Setter Property="Visibility" Value="Collapsed"/>
</Trigger>
</Style.Triggers>
</Style>
</Grid.Resources>
<!--Viste per Feature del Part del Layer-->
<EgtBEAMWALL:FeatureManagerV DataContext="{StaticResource FeatureManagerVM}"
Tag="{Binding Tag.SelBTLLayer.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Visibility="{Binding PartFeature_Visibility}"/>
<TabControl Grid.Row="1"
TabStripPlacement="Left"
Margin="5,5,2.5,5"
Visibility="{Binding PartFeature_Visibility}">
<TabItem Header="P">
<TabItem.Content>
<EgtBEAMWALL:PParameterListV DataContext="{StaticResource PParameterListVM}"
Tag="{Binding Tag.SelBTLLayer.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
<TabItem Header="Q">
<TabItem.Content>
<EgtBEAMWALL:QParameterListV DataContext="{StaticResource QParameterListVM}"
Tag="{Binding Tag.SelBTLLayer.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
</TabControl>
<!--Viste per Feature del Layer-->
<EgtBEAMWALL:FeatureManagerV DataContext="{StaticResource FeatureManagerVM}"
Tag="{Binding Tag.SelBTLLayer.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Visibility="{Binding LayerFeature_Visibility}"/>
<TabControl Grid.Row="1"
TabStripPlacement="Left"
Margin="5,5,2.5,5"
Visibility="{Binding LayerFeature_Visibility}">
<TabItem Header="P">
<TabItem.Content>
<EgtBEAMWALL:PParameterListV DataContext="{StaticResource PParameterListVM}"
Tag="{Binding Tag.SelBTLLayer.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
<TabItem Header="Q">
<TabItem.Content>
<EgtBEAMWALL:QParameterListV DataContext="{StaticResource QParameterListVM}"
Tag="{Binding Tag.SelBTLLayer.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
</TabControl>
<!--<TabControl Grid.Column="1"
Grid.Row="1"
TabStripPlacement="Bottom"
Margin="2.5,5,5,5">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="Parameter">
<TabItem.Content>-->
<Image Grid.Column="1"
Grid.Row="1"
Source="{Binding sCurrDraw}"
Margin="5"/>
<!--</TabItem.Content>
</TabItem>
</TabControl>-->
<TextBlock Grid.Row="2" Grid.ColumnSpan="2"
Text="{Binding Tag.SelBTLLayer.SelBTLPart.SelBTLFeatureVM.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Foreground="{Binding Tag.SelBTLPart.SelBTLFeatureVM.Calc_Background, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5,0,5,0"/>
</Grid>
</TabItem.Content>
</TabItem>
<TabItem Header="STATISTICS">
<TabItem.Content>
<EgtBEAMWALL:StatisticsV DataContext="{StaticResource StatisticsVM}"
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallBottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
</TabControl>
<!--</EgtWPFLib5:EgtScrollViewer>-->
</Grid>
@@ -0,0 +1,3 @@
Public Class LayersWallBottomPanelV
End Class
@@ -0,0 +1,79 @@
Imports EgtWPFLib5
Public Class LayersWallBottomPanelVM
Inherits VMBase
Friend Enum PartFeatureTab As Integer
STRUCTURE_ = 0
LAYER = 1
PART = 2
FEATURE = 3
STATISTICS = 4
End Enum
Private m_SelPartFeatureTab As PartFeatureTab
Public Property SelPartFeatureTab As Integer
Get
Return m_SelPartFeatureTab
End Get
Set(value As Integer)
m_SelPartFeatureTab = value
End Set
End Property
Friend Sub SetSelPartFeatureTab(SelPartFeatureTab As PartFeatureTab)
If m_SelPartFeatureTab = PartFeatureTab.STATISTICS Then
Map.refInstrumentPanelVM.SetStatisticsIsChecked(False)
End If
m_SelPartFeatureTab = SelPartFeatureTab
NotifyPropertyChanged(NameOf(SelPartFeatureTab))
End Sub
Private m_sCurrDraw As String
Public ReadOnly Property sCurrDraw As String
Get
Return m_sCurrDraw
End Get
End Property
Friend Sub SetCurrDraw(sCurrDraw As String)
m_sCurrDraw = sCurrDraw
NotifyPropertyChanged(NameOf(sCurrDraw))
End Sub
Private m_LayerFeature_Visibility As Boolean = False
Public Property LayerFeature_Visibility As Visibility
Get
Return If(m_LayerFeature_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_LayerFeature_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetLayerFeature_Visibility(IsVisible As Boolean)
m_LayerFeature_Visibility = IsVisible
NotifyPropertyChanged(NameOf(LayerFeature_Visibility))
End Sub
Private m_PartFeature_Visibility As Boolean = False
Public Property PartFeature_Visibility As Visibility
Get
Return If(m_PartFeature_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_PartFeature_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetPartFeature_Visibility(IsVisible As Boolean)
m_PartFeature_Visibility = IsVisible
NotifyPropertyChanged(NameOf(PartFeature_Visibility))
End Sub
#Region "CONSTRUCTOR"
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefLayersWallBottomPanelVM(Me)
End Sub
#End Region ' CONSTRUCTOR
End Class
@@ -0,0 +1,103 @@
<UserControl x:Class="LayersWallFeatureListV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
<EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding Tag.BTLFeatureVMList,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallFeatureListV}}}"
SelectedItem="{Binding Tag.SelBTLFeatureVM,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallFeatureListV}}}"
CanUserAddRows="False"
AutoGenerateColumns="False"
CanUserResizeRows="False"
SelectionMode="Single"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
Margin="0,0,0,5"
BindingColumns="{Binding FeatureColumns}"
Style="{StaticResource DataGrid_CustomHighLight}">
<DataGrid.Resources>
<!--DO - Abilitazione-->
<DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
MinWidth="28">
<DataGridCheckBoxColumn.Header>
<CheckBox IsChecked="{Binding Path=Tag.bFeatureDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallFeatureListV}}}"/>
</DataGridCheckBoxColumn.Header>
</DataGridCheckBoxColumn>
<!--Validità feature-->
<DataGridTemplateColumn x:Key="colCALC">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
Background="{Binding Calc_Background}"/>
<!--Width="{Binding ActualHeigth, Source=Self}"/>-->
<Grid Grid.Column="1"
HorizontalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Ellipse Width="5"
Height="5"
Fill="Red"
Visibility="{Binding CALC_ROT_Visibility}"
HorizontalAlignment="Center"/>
<TextBlock Grid.Row="1"
Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
TextAlignment="Center"
FontWeight="Bold"
FontSize="12"
Margin="0,-6,0,-2"/>
<!--<Ellipse Width="5"
Height="5"
Fill="Red"
Visibility="{Binding CALC_ROT_Visibility}"/>
<TextBlock Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
FontWeight="Bold"
FontSize="10"/>-->
<!--<TextBlock Text="&#x2794;"
Visibility="{Binding CALC_FALL_Visibility}"/>-->
</Grid>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Descrizione-->
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Description_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallFeatureListV}}}"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<!-- Menu' tasto destro -->
<ContextMenu x:Key="RowMenu" ItemsSource="{Binding MenuList}" >
<ContextMenu.ItemContainerStyle>
<Style TargetType="MenuItem">
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
<Setter Property="Header" Value="{Binding sMsg}"/>
</Style>
</ContextMenu.ItemContainerStyle>
</ContextMenu>
</DataGrid.Resources>
<DataGrid.InputBindings>
<KeyBinding Key="Delete" Command="{Binding Tag.SelBTLFeatureVM.DeleteFeature_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallFeatureListV}}}" />
</DataGrid.InputBindings>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}" />
<EventSetter Event="PreviewMouseDown" Handler="LayersWallFeatureList_PreviewMouseDown"/>
</Style>
</DataGrid.RowStyle>
</EgtBEAMWALLCORE:EgtDataGrid>
</UserControl>
@@ -0,0 +1,12 @@
Public Class LayersWallFeatureListV
Private Sub LayersWallFeatureList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
If Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM
End If
End If
End Sub
End Class
@@ -0,0 +1,186 @@
<Grid x:Class="LayersWallLeftPanelV"
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.ViewerOptimizer">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="{Binding GridDims[0].GridLen, Mode=TwoWay}"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="{Binding GridDims[1].GridLen, Mode=TwoWay}"/>
</Grid.RowDefinitions>
<!--<GroupBox Header="{Binding SearchFilter_Msg}"
Margin="3,1,3,3">
<Expander>
<Expander.Header>
<Grid HorizontalAlignment="{Binding HorizontalAlignment, RelativeSource={RelativeSource AncestorType=ContentPresenter}, Mode=OneWayToSource}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*" x:Name="ComboColumn"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Section_Msg}"
VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding Tag.SectionList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
SelectedItem="{Binding Tag.SelSection, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
DisplayMemberPath="sSectionXMaterial"
Grid.Column="1"/>
</Grid>
</Expander.Header>
<Grid Margin="1,0,1,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Group_Msg}"
Grid.ColumnSpan="2"
VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding Tag.GroupList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
SelectedItem="{Binding Tag.SelGroup, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
Grid.Column="2"
Margin="0,2,0,2"/>
<TextBlock Text="{Binding SubGroup_Msg}"
Grid.Row="1"
Grid.ColumnSpan="2"
VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding Tag.SubGroupList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
SelectedItem="{Binding Tag.SelSubGroup, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
Grid.Column="2"
Grid.Row="1"
Margin="0,2,0,2"/>
<TextBlock Text="{Binding ParType_Msg}"
Grid.Row="2"
Grid.ColumnSpan="2"
VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding Tag.SearchParamList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
SelectedItem="{Binding Tag.SelSearchParam, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
Grid.Column="2"
Grid.Row="2"
Margin="0,2,0,2"/>
<TextBlock Text="{Binding ParValue_Msg}"
Grid.Row="3"
Grid.ColumnSpan="2"
VerticalAlignment="Center"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.SearchText, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
Grid.Column="2"
Grid.Row="3"
Margin="0,2,0,0"/>
</Grid>
</Expander>
</GroupBox>-->
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<EgtBEAMWALL:ElementLayerTreeViewV DataContext="{StaticResource ElementLayerTreeViewVM}"
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
Grid.Row="0"
MaxHeight="100"/>
<StackPanel Orientation="Horizontal"
Grid.Row="1"
HorizontalAlignment="Right">
<Button Command="{Binding NewRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding NewRawPart_ToolTip}"
IsEnabled="{Binding LayersWallLeftPanel_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddToRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding AddToRawPart_ToolTip}"
IsEnabled="{Binding LayersWallLeftPanel_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddToRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CopyPart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddPart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding AddPart_ToolTip}"
IsEnabled="{Binding LayersWallLeftPanel_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/RemovePart.png" Stretch="Uniform"/>
</Button>
</StackPanel>
<EgtBEAMWALL:BTLPartListV DataContext="{StaticResource PartListVM}"
Tag="{Binding Tag.SelBTLLayer, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
Grid.Row="2"/>
</Grid>
<GridSplitter Height="3" HorizontalAlignment="Stretch" Grid.Row="2"/>
<Grid Grid.Row="3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Command="{Binding CopyFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding CopyFeature_ToolTip}"
IsEnabled="{Binding CopyFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding MacroFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding MacroFeature_ToolTip}"
IsEnabled="{Binding MacroFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/MacroFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding AddFeature_ToolTip}"
IsEnabled="{Binding AddFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemoveFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding RemoveFeature_ToolTip}"
IsEnabled="{Binding RemoveFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/RemoveFeature.png" Stretch="Uniform"/>
</Button>
</StackPanel>
<!--Lista feature per Layer-->
<EgtBEAMWALL:LayersWallFeatureListV DataContext="{ StaticResource FeatureListVM}"
Tag="{Binding Tag.SelBTLLayer, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
Visibility="{Binding LayerFeatureList_Visibility}"
Grid.Row="1"/>
<!--Lista feature per Part-->
<EgtBEAMWALL:FeatureListV DataContext="{ StaticResource FeatureListVM}"
Tag="{Binding Tag.SelBTLLayer.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallLeftPanelV}}}"
Visibility="{Binding PartFeatureList_Visibility}"
Grid.Row="1"/>
</Grid>
</Grid>
@@ -0,0 +1,3 @@
Public Class LayersWallLeftPanelV
End Class
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,104 @@
<StackPanel x:Class="LayersWallPartManagerV"
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.ViewerOptimizer"
Orientation="Horizontal"
Height="28"
IsEnabled="{Binding LayersWallPartManager_IsEnabled}">
<TextBlock Text="BTL Qty"
Style="{StaticResource OptionTextBlock}"/>
<TextBlock Text="{Binding Tag.sCNT,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}},
UpdateSourceTrigger=Explicit}"
Width="25"
Style="{StaticResource OptionTextBlock}"/>
<TextBlock Text="Added Qty"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sADDED,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}},
UpdateSourceTrigger=Explicit}"
Width="25"/>
<TextBlock Text="W"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sW,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}},
UpdateSourceTrigger=Explicit}" Width="45"/>
<TextBlock Text="H"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sH,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}},
UpdateSourceTrigger=Explicit}" Width="45"/>
<TextBlock Text="L"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sL,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}},
UpdateSourceTrigger=Explicit}" Width="65"/>
<TextBlock Text="Inverti"
Style="{StaticResource OptionTextBlock}"
Margin="10,0,0,0"/>
<Image IsEnabled="{Binding Tag.bLockInversion,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}}}"
Height="15"
Stretch="Uniform"
Visibility="{Binding Lock_Visibility}"
Style="{StaticResource LockImage}"/>
<Button Command="{Binding Tag.Invert_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}}}"
Style="{StaticResource ToolBar_SmallButton}"
Margin="5,0,0,0">
<Image Source="/Resources/PartManager/LeftInvert.png" Stretch="Uniform"/>
</Button>
<TextBlock Text="{Binding Tag.sINVERTED,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}}}"
TextAlignment="Center"
Width="25"
Style="{StaticResource OptionTextBlock}"/>
<Button Command="{Binding Tag.Invert_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}}}"
Style="{StaticResource ToolBar_SmallButton}"
Margin="0,0,5,0">
<Image Source="/Resources/PartManager/RightInvert.png" Stretch="Uniform"/>
</Button>
<TextBlock Text="Ruota"
Style="{StaticResource OptionTextBlock}"
Margin="10,0,0,0"/>
<Image IsEnabled="{Binding Tag.bLockRotation,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}}}"
Height="15"
Stretch="Uniform"
Visibility="{Binding Lock_Visibility}"
Style="{StaticResource LockImage}"/>
<Button Command="{Binding Tag.BackRotation_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}}}"
Style="{StaticResource ToolBar_SmallButton}"
Margin="5,0,0,0">
<Image Source="/Resources/PartManager/LeftRotate.png" Stretch="Uniform"/>
</Button>
<TextBlock Text="{Binding Tag.sROTATED,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}}}"
TextAlignment="Center"
Width="25"
Style="{StaticResource OptionTextBlock}"/>
<Button Command="{Binding Tag.ForwardRotation_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:LayersWallPartManagerV}}}"
Style="{StaticResource ToolBar_SmallButton}"
Margin="0,0,10,0">
<Image Source="/Resources/PartManager/RightRotate.png" Stretch="Uniform"/>
</Button>
<!--Comando inutilizzato ma conservato per eventuale rotazione a causa di importazione con rotazione sbagliata-->
<!--<Button Command="{Binding Tag.XRotation_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
Style="{StaticResource ToolBar_SmallButton}"
Margin="0,0,10,0">
<Image Source="/Resources/PartManager/RightRotate.png" Stretch="Uniform"/>
</Button>-->
<TextBlock Text="{Binding Tag.sNAM,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
Style="{StaticResource OptionTextBlock}"/>
</StackPanel>
@@ -0,0 +1,3 @@
Public Class LayersWallPartManagerV
End Class
@@ -0,0 +1,38 @@
Imports EgtBEAMWALL.Core.ConstGen
Imports EgtWPFLib5
Public Class LayersWallPartManagerVM
Inherits VMBase
Private m_LayersWallPartManager_IsEnabled As Boolean = True
Public ReadOnly Property LayersWallPartManager_IsEnabled As Boolean
Get
Return m_LayersWallPartManager_IsEnabled
End Get
End Property
Private m_Lock_Visibility As Visibility
Public ReadOnly Property Lock_Visibility As Visibility
Get
'Return Visibility.Collapsed
Return If(Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso
Map.refProjectVM.BTLStructureVM.nPROJTYPE = Core.ConstBeam.BWType.WALL AndAlso
Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO), Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Sub New()
' salvo riferimento in Map
Map.SetRefLayersWallPartManagerVM(Me)
End Sub
Friend Sub SetLayersWallPartManagerIsEnabled(bIsEnabled As Boolean)
m_LayersWallPartManager_IsEnabled = bIsEnabled
NotifyPropertyChanged(NameOf(LayersWallPartManager_IsEnabled))
End Sub
Friend Sub LockVisibilityUpdate()
NotifyPropertyChanged(NameOf(Lock_Visibility))
End Sub
End Class
@@ -0,0 +1,83 @@
<EgtFloating:EgtFloatingPanel x:Class="LayersWallProjManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
IsRightDockable="False"
IsEnabled="{Binding LayersWallProjManager_IsEnabled}"
Style="{StaticResource ToolBar_EgtFloatingPanel}">
<!--Barra superiore dei comandi-->
<Button Command="{Binding New_Command}"
ToolTip="{Binding NewToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/New.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding OpenCommand}"
ToolTip="{Binding OpenToolTip}"
ContextMenuService.Placement="Bottom"
Tag="{Binding}"
IsEnabled="False"
Style="{StaticResource ToolBar_Button}">
<Button.ContextMenu>
<ContextMenu ItemsSource="{Binding MruFileNames}">
<ContextMenu.Resources>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Command"
Value="{Binding PlacementTarget.Tag.OpenMruFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}" />
<Setter Property="CommandParameter" Value="{Binding}" />
</Style>
</ContextMenu.Resources>
</ContextMenu>
</Button.ContextMenu>
<Image Source="/Resources/ProjectManager/Open.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
IsEnabled="False"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
<!--<Button Command="{Binding SaveAsCommand}"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/SaveAs.png" Stretch="Uniform"/>
</Button>-->
<Button Command="{Binding ImportBTL_Command}"
ToolTip="{Binding ImportBTL_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/ImportBTL.png" Stretch="Uniform"/>
</Button>
<!--<Button Command="{Binding OptionsCommand}"
ToolTip="{Binding OptionsToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/Options.png" Height="22"/>
</Button>-->
<!--<Button Command="{Binding SendFeedbackCommand}"
ToolTip="{Binding SendFeedbackToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/Send.png" Height="22" Margin="3,0,3,0" />
</Button>-->
<!--<Button Command="{Binding UpdateBTL_Command}"
ToolTip="{Binding UpdateBTL_ToolTip}"
Visibility="{Binding UpdateBTL_Visibility}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/UpdateBTL.png" Stretch="Uniform"/>
</Button>-->
<!--<Button Command="{Binding ExportProject_Command}"
ToolTip="{Binding ExportProject_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/ExportProject.png" Stretch="Uniform"/>
</Button>-->
<!--<Button Command="{Binding ImportProject_Command}"
ToolTip="{Binding ImportProject_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/ImportProject.png" Stretch="Uniform"/>
</Button>-->
<!--<Button Command="{Binding GoToProd_Command}"
ToolTip="{Binding GoToProd_ToolTip}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/ProjectManager/GoToprod.png" Stretch="Uniform"/>
</Button>-->
</EgtFloating:EgtFloatingPanel>
@@ -0,0 +1,3 @@
Public Class LayersWallProjManagerV
End Class
File diff suppressed because it is too large Load Diff
@@ -12,6 +12,10 @@
<RadioButton Content="{Binding Optimizer_Msg}"
IsChecked="{Binding Machining_IsChecked}"
Style="{StaticResource MainMenu_ToggleButton}"/>
<RadioButton Content="{Binding LayersWall_Msg}"
IsChecked="{Binding LayersWall_IsChecked}"
Style="{StaticResource MainMenu_ToggleButton}"
Visibility="{Binding LayersWall_Visibility}"/>
<Button Content="{Binding Supervisor_Msg}"
Command="{Binding Supervisor_Command}"
Visibility="{Binding Supervisor_Visibility}"
@@ -61,6 +61,21 @@ Public Class MainMenuVM
End Set
End Property
Public Property LayersWall_IsChecked As Boolean
Get
Return m_SelPage = Pages.LAYERSWALL
End Get
Set(value As Boolean)
If value Then
'If Not IsNothing(Map.refProjManagerVM.CurrProj) AndAlso Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso
' Map.refProjManagerVM.CurrProj.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
' Map.refProdManagerVM.CurrProd.SetReloadProject(False)
'End If
SelPage = Pages.LAYERSWALL
End If
End Set
End Property
Public Property Supervisor_IsChecked As Boolean
Get
Return m_SelPage = Pages.SUPERVISOR
@@ -79,6 +94,13 @@ Public Class MainMenuVM
End Set
End Property
'Private m_LayersWall_Visibility As Visibility
Public ReadOnly Property LayersWall_Visibility As Visibility
Get
Return Map.refMainWindowVM.MainWindowM.nUserLevel > 5 ' m_LayersWall_Visibility
End Get
End Property
Private m_Supervisor_Visibility As Visibility
Public ReadOnly Property Supervisor_Visibility As Visibility
Get
@@ -106,6 +128,8 @@ Public Class MainMenuVM
bOk = ExitVIEW(bVerifyModification)
Case Pages.MACHINING
bOk = ExitMACHINING(bVerifyModification)
Case Pages.LAYERSWALL
bOk = ExitLAYERSWALL(bVerifyModification)
Case Pages.CONFIG
bOk = ExitCONFIG()
End Select
@@ -121,6 +145,10 @@ Public Class MainMenuVM
' Map.refMachGroupPanelVM.SetMachGroupState(True)
InitMACHINING()
'Map.refTopCommandBarVM.IsEnabled = True
Case Pages.LAYERSWALL
' Map.refMachGroupPanelVM.SetMachGroupState(True)
InitLAYERSWALL()
'Map.refTopCommandBarVM.IsEnabled = True
Case Pages.CONFIG
InitCONFIG()
'Map.refMachGroupPanelVM.SetMachGroupState(False)
@@ -131,6 +159,7 @@ Public Class MainMenuVM
' aggiorno visualizzazione RadioButton
NotifyPropertyChanged("View_IsChecked")
NotifyPropertyChanged("Machining_IsChecked")
NotifyPropertyChanged("LayersWall_IsChecked")
NotifyPropertyChanged("Supervisor_IsChecked")
NotifyPropertyChanged("Config_IsChecked")
Map.refProjectVM.NotifyPropertyChanged("SelItem")
@@ -150,6 +179,12 @@ Public Class MainMenuVM
End Get
End Property
Public ReadOnly Property LayersWall_Msg As String
Get
Return "LayersWall" 'EgtMsg(61831)
End Get
End Property
Public ReadOnly Property Configuration_Msg As String
Get
Return EgtMsg(61832)
@@ -210,14 +245,19 @@ Public Class MainMenuVM
Private Function InitVIEW() As Boolean
Map.refProjectVM.SetBottomPanel_Visibility(True)
Map.refProjectVM.SetLeftPanel_Visibility(True)
Map.refProjectVM.SetLayersWallLeftPanel_Visibility(False)
Map.refProjectVM.SetLayersWallBottomPanel_Visibility(False)
Map.refLeftPanelVM.UpdateView()
Map.refProjectVM.SetPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallLayerPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallPartPartManager_Visibility(False)
Map.refProjectVM.SetFeatureManager_Visibility(True)
Map.refProjectVM.SetTopPanel_Visibility(False)
Map.refProjectVM.SetShowBeamPanel_Visibility(True)
Map.refProjectVM.SetProjManager_Visibility(True)
Map.refProjectVM.SetProdManager_Visibility(False)
Map.refProjectVM.SetOptimizePanel_Visibility(Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
Map.refProjectVM.SetLayersWallProjManager_Visibility(False)
Map.refProjectVM.NotifyAllPanelVisibility()
Map.refCALCPanelVM.SetChooseMachineBtn_Visibility(True)
If Not IsNothing(Map.refFeatureListVM.colFeature_Do) Then
@@ -298,13 +338,18 @@ Public Class MainMenuVM
Map.refInstrumentPanelVM.ResetStatisticsIsChecked()
Map.refProjectVM.SetBottomPanel_Visibility(False)
Map.refProjectVM.SetLeftPanel_Visibility(True)
Map.refProjectVM.SetLayersWallLeftPanel_Visibility(False)
Map.refProjectVM.SetLayersWallBottomPanel_Visibility(False)
Map.refProjectVM.SetPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallLayerPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallPartPartManager_Visibility(False)
Map.refProjectVM.SetFeatureManager_Visibility(False)
Map.refProjectVM.SetTopPanel_Visibility(True)
Map.refProjectVM.SetShowBeamPanel_Visibility(False)
Map.refProjectVM.SetProjManager_Visibility(False)
Map.refProjectVM.SetProdManager_Visibility(True)
Map.refProjectVM.SetOptimizePanel_Visibility(True)
Map.refProjectVM.SetLayersWallProjManager_Visibility(False)
Map.refCALCPanelVM.SetChooseMachine_Visibility(False)
Return True
End Function
@@ -380,13 +425,18 @@ Public Class MainMenuVM
Map.refTopPanelVM.NotifyPropertyChanged(NameOf(Map.refTopPanelVM.MovePart_Visibility))
Map.refProjectVM.SetBottomPanel_Visibility(False)
Map.refProjectVM.SetLeftPanel_Visibility(True)
Map.refProjectVM.SetLayersWallLeftPanel_Visibility(False)
Map.refProjectVM.SetLayersWallBottomPanel_Visibility(False)
Map.refLeftPanelVM.UpdateView()
Map.refProjectVM.SetPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallLayerPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallPartPartManager_Visibility(False)
Map.refProjectVM.SetFeatureManager_Visibility(False)
Map.refProjectVM.SetTopPanel_Visibility(True)
Map.refProjectVM.SetShowBeamPanel_Visibility(False)
Map.refProjectVM.SetProjManager_Visibility(False)
Map.refProjectVM.SetProdManager_Visibility(True)
Map.refProjectVM.SetLayersWallProjManager_Visibility(False)
Map.refProjectVM.NotifyAllPanelVisibility()
Map.refCALCPanelVM.SetChooseMachineBtn_Visibility(False)
Map.refTopPanelVM.UpdateQParameterVisibility()
@@ -425,18 +475,135 @@ Public Class MainMenuVM
Map.refInstrumentPanelVM.ResetStatisticsIsChecked()
Map.refProjectVM.SetBottomPanel_Visibility(True)
Map.refProjectVM.SetLeftPanel_Visibility(False)
Map.refProjectVM.SetLayersWallLeftPanel_Visibility(False)
Map.refProjectVM.SetLayersWallBottomPanel_Visibility(False)
Map.refProjectVM.SetPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallLayerPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallPartPartManager_Visibility(False)
Map.refProjectVM.SetFeatureManager_Visibility(True)
Map.refProjectVM.SetTopPanel_Visibility(False)
Map.refProjectVM.SetShowBeamPanel_Visibility(True)
Map.refProjectVM.SetProjManager_Visibility(True)
Map.refProjectVM.SetProdManager_Visibility(False)
Map.refProjectVM.SetLayersWallProjManager_Visibility(False)
Map.refProjectVM.SetOptimizePanel_Visibility(Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
Map.refCALCPanelVM.SetChooseMachine_Visibility(False)
EgtResetCurrMachGroup()
Return True
End Function
Private Function InitLAYERSWALL() As Boolean
Map.refProjectVM.SetBottomPanel_Visibility(False)
Map.refProjectVM.SetLeftPanel_Visibility(False)
Map.refProjectVM.SetLayersWallLeftPanel_Visibility(True)
Map.refProjectVM.SetLayersWallBottomPanel_Visibility(True)
Map.refLeftPanelVM.UpdateView()
Map.refProjectVM.SetPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallLayerPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallPartPartManager_Visibility(False)
Map.refProjectVM.SetFeatureManager_Visibility(True)
Map.refProjectVM.SetTopPanel_Visibility(False)
Map.refProjectVM.SetShowBeamPanel_Visibility(True)
Map.refProjectVM.SetProjManager_Visibility(False)
Map.refProjectVM.SetProdManager_Visibility(False)
Map.refProjectVM.SetOptimizePanel_Visibility(Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
Map.refProjectVM.SetLayersWallProjManager_Visibility(True)
Map.refProjectVM.NotifyAllPanelVisibility()
Map.refCALCPanelVM.SetChooseMachineBtn_Visibility(True)
If Not IsNothing(Map.refFeatureListVM.colFeature_Do) Then
Map.refFeatureListVM.colFeature_Do.ColumnVisibility = Visibility.Visible
End If
' aggiorno la visibilità delle colonne
For Each col In Map.refFeatureListVM.FeatureColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
For Each col In Map.refPartListVM.PartColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
For Each col In Map.refStatisticsVM.StatisticsColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
For Each col In Map.refPParameterListVM.PParameterListColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
For Each col In Map.refQParameterListVM.QParameterListColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
' imposto dimensioni colonne/righe della Grid
DimensionsIniFile.ReadGridDimensions(ConstDims.PROJECT_VIEW, Map.refProjectVM.GridDims)
DimensionsIniFile.ReadGridDimensions(ConstDims.LEFTPANEL_VIEW, Map.refLeftPanelVM.GridDims)
'' apro progetto proj
'If Not IsNothing(Map.refProjManagerVM.CurrProj) Then
' If Map.refProjManagerVM.CurrProj.bReloadProject Then
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROJ, 2, EgtMsg(63005), 10, 100) ' Loading parts
' Map.refProjManagerVM.OpenProject(Map.refProjManagerVM.CurrProj)
' ' aggiorno le colonne in base al tipo progetto
' If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
' Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
' Map.refTopPanelVM.ManageQParamsRowVisibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE <> BWType.BEAM)
' Map.refPartInRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
' Else
' Map.refRawPartListVM.UpdateColumns(BWType.BEAM)
' Map.refTopPanelVM.ManageQParamsRowVisibility(BWType.BEAM)
' Map.refPartInRawPartListVM.UpdateColumns(BWType.BEAM)
' End If
' DbControllers.m_ProjController.LockByProjId(Map.refProjManagerVM.CurrProj.nProjId, True)
' Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
' Else
' LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROJ, 2, EgtMsg(63005), 10, 100) ' Loading parts
' ' verifico se il prod di provenienza ha piu' proj
' If Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso Map.refProdManagerVM.CurrProd.nProjIdList.Count > 1 Then
' ' se si rigenero BTLStructure
' Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(Map.refProjManagerVM.CurrProj.nProjId))
' ' carico filtri di ricerca
' Map.refProjectVM.BTLStructureVM.LoadFilters()
' End If
' ' mostro tutti i pezzi
' Map.refShowBeamPanelVM.ShowAll(True)
' Map.refProjManagerVM.CurrProj.SetReloadProject(True)
' End If
' ' aggiorno titolo
' Map.refMainWindowVM.UpdateTitle()
' DbControllers.m_ProjController.LockByProjId(Map.refProjManagerVM.CurrProj.nProjId, True)
'Else
Map.refSceneHostVM.MainController.NewProject()
Map.refProjectVM.BTLStructureVM = Nothing
Map.refProjectVM.MachGroupPanelVM = Nothing
'End If
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeParam_Visibility))
Map.refInstrumentPanelVM.NotifyPropertyChanged(NameOf(Map.refInstrumentPanelVM.ChangeMaterial_Visibility))
Return True
End Function
Private Function ExitLAYERSWALL(bVerifyModification As Boolean) As Boolean
' verifico se progetto modificato, e chiedo se salvare
If bVerifyModification Then
If Not ProjFileVM.VerifyProjectModification(Map.refProjManagerVM.CurrProj, ProjectType.PROJ) Then
Return False
End If
End If
' resetto eventuale visualizzazione statistiche
Map.refInstrumentPanelVM.ResetStatisticsIsChecked()
Map.refProjectVM.SetBottomPanel_Visibility(True)
Map.refProjectVM.SetLeftPanel_Visibility(True)
Map.refProjectVM.SetLayersWallLeftPanel_Visibility(True)
Map.refProjectVM.SetLayersWallBottomPanel_Visibility(True)
Map.refProjectVM.SetPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallLayerPartManager_Visibility(False)
Map.refProjectVM.SetLayersWallPartPartManager_Visibility(False)
Map.refProjectVM.SetFeatureManager_Visibility(False)
Map.refProjectVM.SetTopPanel_Visibility(True)
Map.refProjectVM.SetShowBeamPanel_Visibility(False)
Map.refProjectVM.SetProjManager_Visibility(False)
Map.refProjectVM.SetProdManager_Visibility(True)
Map.refProjectVM.SetOptimizePanel_Visibility(True)
Map.refProjectVM.SetLayersWallProjManager_Visibility(False)
Map.refCALCPanelVM.SetChooseMachine_Visibility(False)
Return True
End Function
Private Function InitCONFIG() As Boolean
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
Map.refMainMenuVM.NotifyPropertyChanged(NameOf(Map.refMainMenuVM.SendFeedbackIsEnabled))
@@ -41,7 +41,7 @@ Public Class MainWindowVM
' proprietà che seleziona la giusta pagina del TabControl
Public Property nSelTabPage As Integer
Get
Return If(IsNothing(Map.refMainMenuVM.SelPage) OrElse Map.refMainMenuVM.SelPage = -1 OrElse Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.MACHINING, 0, 1)
Return If(IsNothing(Map.refMainMenuVM.SelPage) OrElse Map.refMainMenuVM.SelPage = -1 OrElse Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.MACHINING OrElse Map.refMainMenuVM.SelPage = Pages.LAYERSWALL, 0, 1)
End Get
Set(value As Integer)
End Set
@@ -11,6 +11,8 @@
Visibility="{Binding DataContext.ProdManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<EgtBEAMWALL:OptimizePanelV DataContext="{StaticResource OptimizePanelVM}"
Visibility="{Binding DataContext.OptimizePanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<EgtBEAMWALL:LayersWallProjManagerV DataContext="{StaticResource LayersWallProjManagerVM}"
Visibility="{Binding DataContext.LayersWallProjManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
</EgtFloating:EgtFloatingTray>
<EgtBEAMWALL:FreeContourInputV DockPanel.Dock="Right"
@@ -34,6 +36,11 @@
DataContext="{StaticResource LeftPanelVM}"
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.LeftPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<EgtBEAMWALL:LayersWallLeftPanelV Grid.Column="0"
Grid.RowSpan="4"
DataContext="{StaticResource LayersWallLeftPanelVM}"
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.LayersWallLeftPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<GridSplitter Grid.Column="1"
Grid.RowSpan="4"
Width="3"
@@ -79,6 +86,18 @@
DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.PartManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<!--PartManager per Layer nella pagina LayersWall-->
<EgtBEAMWALL:LayersWallPartManagerV Grid.Row="0"
DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLLayer, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.LayersWallLayerPartManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<!--PartManager per Part nel Layer nella pagina LayersWall-->
<EgtBEAMWALL:LayersWallPartManagerV Grid.Row="0"
DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLLayer.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.LayersWallPartPartManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"/>
<Grid Grid.Column="2" Grid.Row="1">
<EgtBEAMWALL:TopPanelV
DataContext="{StaticResource TopPanelVM}"
@@ -90,6 +109,11 @@
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.BottomPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Height="Auto"/>
<EgtBEAMWALL:LayersWallBottomPanelV
DataContext="{StaticResource LayersWallBottomPanelVM}"
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Visibility="{Binding DataContext.LayersWallBottomPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjectV}}}"
Height="Auto"/>
</Grid>
</Grid>
@@ -65,6 +65,19 @@ Public Class ProjectVM
m_LeftPanel_Visibility = IsVisible
End Sub
Private m_LayersWallLeftPanel_Visibility As Boolean = False
Public Property LayersWallLeftPanel_Visibility As Visibility
Get
Return If(m_LayersWallLeftPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_LayersWallLeftPanel_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetLayersWallLeftPanel_Visibility(IsVisible As Boolean)
m_LayersWallLeftPanel_Visibility = IsVisible
End Sub
Private m_TopPanel_Visibility As Boolean = False
Public Property TopPanel_Visibility As Visibility
Get
@@ -91,6 +104,19 @@ Public Class ProjectVM
m_BottomPanel_Visibility = IsVisible
End Sub
Private m_LayersWallBottomPanel_Visibility As Boolean = False
Public Property LayersWallBottomPanel_Visibility As Visibility
Get
Return If(m_LayersWallBottomPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_LayersWallBottomPanel_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetLayersWallBottomPanel_Visibility(IsVisible As Boolean)
m_LayersWallBottomPanel_Visibility = IsVisible
End Sub
Private m_PartManager_Visibility As Boolean = True
Public Property PartManager_Visibility As Visibility
Get
@@ -104,6 +130,34 @@ Public Class ProjectVM
m_PartManager_Visibility = IsVisible
End Sub
Private m_LayersWallLayerPartManager_Visibility As Boolean = True
Public Property LayersWallLayerPartManager_Visibility As Visibility
Get
Return If(m_LayersWallLayerPartManager_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_LayersWallLayerPartManager_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetLayersWallLayerPartManager_Visibility(IsVisible As Boolean)
m_LayersWallLayerPartManager_Visibility = IsVisible
NotifyPropertyChanged(NameOf(LayersWallLayerPartManager_Visibility))
End Sub
Private m_LayersWallPartPartManager_Visibility As Boolean = True
Public Property LayersWallPartPartManager_Visibility As Visibility
Get
Return If(m_LayersWallPartPartManager_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_LayersWallPartPartManager_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetLayersWallPartPartManager_Visibility(IsVisible As Boolean)
m_LayersWallPartPartManager_Visibility = IsVisible
NotifyPropertyChanged(NameOf(LayersWallPartPartManager_Visibility))
End Sub
Private m_FeatureManager_Visibility As Boolean = True
Public Property FeatureManager_Visibility As Visibility
Get
@@ -176,6 +230,19 @@ Public Class ProjectVM
Map.refOptimizePanelVM.NotifyPropertyChanged(NameOf(Map.refOptimizePanelVM.NestingOption_Visibility))
End Sub
Private m_LayersWallProjManager_Visibility As Boolean = True
Public Property LayersWallProjManager_Visibility As Visibility
Get
Return If(m_LayersWallProjManager_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
Set(value As Visibility)
m_LayersWallProjManager_Visibility = (value = Visibility.Visible)
End Set
End Property
Friend Sub SetLayersWallProjManager_Visibility(IsVisible As Boolean)
m_LayersWallProjManager_Visibility = IsVisible
End Sub
Friend Sub NotifyCalcPanel_Visibility()
Map.refCALCPanelVM.NotifyPropertyChanged(NameOf(Map.refCALCPanelVM.ViewPage_Visibility))
End Sub
@@ -196,13 +263,17 @@ Public Class ProjectVM
Friend Sub NotifyAllPanelVisibility()
NotifyPropertyChanged("LeftPanel_Visibility")
NotifyPropertyChanged("LayersWallLeftPanel_Visibility")
NotifyPropertyChanged("TopPanel_Visibility")
NotifyPropertyChanged("BottomPanel_Visibility")
NotifyPropertyChanged("LayersWallBottomPanel_Visibility")
NotifyPropertyChanged("PartManager_Visibility")
NotifyPropertyChanged("LayersWallPartManager_Visibility")
NotifyPropertyChanged("FeatureManager_Visibility")
NotifyPropertyChanged("ShowBeamPanel_Visibility")
NotifyPropertyChanged("ProjManager_Visibility")
NotifyPropertyChanged("ProdManager_Visibility")
NotifyPropertyChanged("LayersWallProjManager_Visibility")
NotifyCalcPanel_Visibility()
End Sub
@@ -234,7 +305,9 @@ Public Class ProjectVM
Map.refCALCPanelVM.SetCalcPanelIsEnabled(bIsEnabled)
Map.refMainMenuVM.SetMainMenuIsEnabled(bIsEnabled)
Map.refPartManagerVM.SetPartManagerIsEnabled(bIsEnabled)
Map.refLayersWallPartManagerVM.SetLayersWallPartManagerIsEnabled(bIsEnabled)
Map.refLeftPanelVM.SetLeftPanelIsEnabled(bIsEnabled)
Map.refLayersWallLeftPanelVM.SetLayersWallLeftPanelIsEnabled(bIsEnabled)
Map.refProjManagerVM.SetProjManagerIsEnabled(bIsEnabled)
Map.refProdManagerVM.SetProdManagerIsEnabled(bIsEnabled)
Map.refTopPanelVM.SetTopPanelIsEnabled(bIsEnabled)
@@ -664,41 +664,80 @@ Public Class MySceneHostVM
Private Sub OnImportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean)
WriteMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, Path.GetDirectoryName(sFile))
Dim bFirstPart As Boolean = EgtGetFirstPart() <> GDB_ID.NULL
If bOk OrElse bFirstPart Then
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 2, EgtMsg(63005), 50, 70) ' Loading parts
' leggo struttura BTL
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
' scrivo in ogni pezzo ProjId
EgtSetInfo(nPartId, BTL_PRT_PROJ, Map.refProjManagerVM.nLoadingProjId)
nPartId = EgtGetNextPart(nPartId)
' scrivo Id negli outline
Dim nPRId As Integer = 1
Dim nOutlineLayer As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
If nOutlineLayer <> GDB_ID.NULL Then
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
While nOutlineId <> GDB_ID.NULL
' verifico che sia feature
If EgtExistsInfo(nOutlineId, MGR_FTR_PRC) Then
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
nPRId += 1
End If
nOutlineId = EgtGetNext(nOutlineId)
End While
End If
End While
' scrivo info proj e type su layer BtlInfo
Dim nBTLInfoLayer As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
EgtSetInfo(nBTLInfoLayer, BTL_PRT_PROJ, Map.refProjManagerVM.nLoadingProjId)
EgtSetInfo(nBTLInfoLayer, BTL_GEN_PROJTYPE, Map.refProjManagerVM.CurrProj.nType)
' scrivo info proj su layer AsseBase
Dim nAsseBaseLayer As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, ASSEBASE)
EgtSetInfo(nAsseBaseLayer, BTL_PRT_PROJ, Map.refProjManagerVM.nLoadingProjId)
If Map.refMainMenuVM.SelPage = Pages.LAYERSWALL Then
If bOk OrElse bFirstPart Then
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 2, EgtMsg(63005), 50, 70) ' Loading parts
' leggo struttura BTL
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
' scrivo in ogni pezzo ProjId
EgtSetInfo(nPartId, BTL_PRT_PROJ, Map.refLayersWallProjManagerVM.nLoadingProjId)
nPartId = EgtGetNextPart(nPartId)
' scrivo Id negli outline
Dim nPRId As Integer = 1
Dim nOutlineLayer As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
If nOutlineLayer <> GDB_ID.NULL Then
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
While nOutlineId <> GDB_ID.NULL
' verifico che sia feature
If EgtExistsInfo(nOutlineId, MGR_FTR_PRC) Then
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
nPRId += 1
End If
nOutlineId = EgtGetNext(nOutlineId)
End While
End If
End While
' scrivo info proj e type su layer BtlInfo
Dim nBTLInfoLayer As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
EgtSetInfo(nBTLInfoLayer, BTL_PRT_PROJ, Map.refLayersWallProjManagerVM.nLoadingProjId)
EgtSetInfo(nBTLInfoLayer, BTL_GEN_PROJTYPE, Map.refLayersWallProjManagerVM.CurrProj.nType)
' scrivo info proj su layer AsseBase
Dim nAsseBaseLayer As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, ASSEBASE)
EgtSetInfo(nAsseBaseLayer, BTL_PRT_PROJ, Map.refLayersWallProjManagerVM.nLoadingProjId)
Else
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
Map.refLayersWallProjManagerVM.NewProject()
End If
Else
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
Map.refProjManagerVM.NewProject()
If bOk OrElse bFirstPart Then
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 2, EgtMsg(63005), 50, 70) ' Loading parts
' leggo struttura BTL
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
' scrivo in ogni pezzo ProjId
EgtSetInfo(nPartId, BTL_PRT_PROJ, Map.refProjManagerVM.nLoadingProjId)
nPartId = EgtGetNextPart(nPartId)
' scrivo Id negli outline
Dim nPRId As Integer = 1
Dim nOutlineLayer As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
If nOutlineLayer <> GDB_ID.NULL Then
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
While nOutlineId <> GDB_ID.NULL
' verifico che sia feature
If EgtExistsInfo(nOutlineId, MGR_FTR_PRC) Then
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
nPRId += 1
End If
nOutlineId = EgtGetNext(nOutlineId)
End While
End If
End While
' scrivo info proj e type su layer BtlInfo
Dim nBTLInfoLayer As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
EgtSetInfo(nBTLInfoLayer, BTL_PRT_PROJ, Map.refProjManagerVM.nLoadingProjId)
EgtSetInfo(nBTLInfoLayer, BTL_GEN_PROJTYPE, Map.refProjManagerVM.CurrProj.nType)
' scrivo info proj su layer AsseBase
Dim nAsseBaseLayer As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, ASSEBASE)
EgtSetInfo(nAsseBaseLayer, BTL_PRT_PROJ, Map.refProjManagerVM.nLoadingProjId)
Else
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
Map.refProjManagerVM.NewProject()
End If
End If
MainScene.SetStatusNull()
@@ -50,6 +50,10 @@
<OmagOFFICE:MachiningTabVM x:Key="MachiningTabVM"/>
<OmagOFFICE:SimulTabVM x:Key="SimulTabVM"/>-->
<EgtBEAMWALL:MyMachGroupPanelVM x:Key="MachGroupPanelVM"/>
<EgtBEAMWALL:ElementLayerTreeViewVM x:Key="ElementLayerTreeViewVM"/>
<EgtBEAMWALL:LayersWallLeftPanelVM x:Key="LayersWallLeftPanelVM"/>
<EgtBEAMWALL:LayersWallBottomPanelVM x:Key="LayersWallBottomPanelVM"/>
<EgtBEAMWALL:LayersWallProjManagerVM x:Key="LayersWallProjManagerVM"/>
<!--Colori predefiniti-->
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
+63 -1
View File
@@ -33,6 +33,11 @@ Module Map
Private m_refQParameterListVM As QParameterListVM
Private m_refFeatureManagerVM As FeatureManagerVM
Private m_refAddSectionXMaterialWndVM As AddSectionXMaterialWndVM
Private m_refElementLayerTreeViewVM As ElementLayerTreeViewVM
Private m_refLayersWallLeftPanelVM As LayersWallLeftPanelVM
Private m_refLayersWallBottomPanelVM As LayersWallBottomPanelVM
Private m_refLayersWallPartManagerVM As LayersWallPartManagerVM
Private m_refLayersWallProjManagerVM As LayersWallProjManagerVM
'Private m_refOpenProjectFileDialogVM As OpenProjectFileDialogVM
'Private m_refRawPartTabVM As RawPartTabVM
'Private m_refNestingTabVM As NestingTabVM
@@ -234,6 +239,36 @@ Module Map
End Get
End Property
Public ReadOnly Property refElementLayerTreeViewVM As ElementLayerTreeViewVM
Get
Return m_refElementLayerTreeViewVM
End Get
End Property
Public ReadOnly Property refLayersWallLeftPanelVM As LayersWallLeftPanelVM
Get
Return m_refLayersWallLeftPanelVM
End Get
End Property
Public ReadOnly Property refLayersWallBottomPanelVM As LayersWallBottomPanelVM
Get
Return m_refLayersWallBottomPanelVM
End Get
End Property
Public ReadOnly Property refLayersWallPartManagerVM As LayersWallPartManagerVM
Get
Return m_refLayersWallPartManagerVM
End Get
End Property
Public ReadOnly Property refLayersWallProjManagerVM As LayersWallProjManagerVM
Get
Return m_refLayersWallProjManagerVM
End Get
End Property
'Public ReadOnly Property refOpenProjectFileDialogVM As OpenProjectFileDialogVM
' Get
' Return m_refOpenProjectFileDialogVM
@@ -441,6 +476,31 @@ Module Map
Return Not IsNothing(m_refAddSectionXMaterialWndVM)
End Function
Friend Function SetRefElementLayerTreeViewVM(ElementLayerTreeViewVM As ElementLayerTreeViewVM) As Boolean
m_refElementLayerTreeViewVM = ElementLayerTreeViewVM
Return Not IsNothing(m_refElementLayerTreeViewVM)
End Function
Friend Function SetRefLayersWallLeftPanelVM(LayersWallLeftPanelVM As LayersWallLeftPanelVM) As Boolean
m_refLayersWallLeftPanelVM = LayersWallLeftPanelVM
Return Not IsNothing(m_refLayersWallLeftPanelVM)
End Function
Friend Function SetRefLayersWallBottomPanelVM(LayersWallBottomPanelVM As LayersWallBottomPanelVM) As Boolean
m_refLayersWallBottomPanelVM = LayersWallBottomPanelVM
Return Not IsNothing(m_refLayersWallBottomPanelVM)
End Function
Friend Function SetRefLayersWallPartManagerVM(LayersWallPartManagerVM As LayersWallPartManagerVM) As Boolean
m_refLayersWallPartManagerVM = LayersWallPartManagerVM
Return Not IsNothing(m_refLayersWallPartManagerVM)
End Function
Friend Function SetRefLayersWallProjManagerVM(LayersWallProjManagerVM As LayersWallProjManagerVM) As Boolean
m_refLayersWallProjManagerVM = LayersWallProjManagerVM
Return Not IsNothing(m_refLayersWallProjManagerVM)
End Function
'Friend Function SetRefOpenProjectFileDialogVM(OpenProjectFileDialogVM As OpenProjectFileDialogVM) As Boolean
' m_refOpenProjectFileDialogVM = OpenProjectFileDialogVM
' Return Not IsNothing(m_refOpenProjectFileDialogVM)
@@ -513,7 +573,9 @@ Module Map
Not IsNothing(m_refPartListVM) AndAlso Not IsNothing(m_refFeatureInPartInRawPartListVM) AndAlso
Not IsNothing(m_refStatisticsVM) AndAlso Not IsNothing(m_refPParameterListVM) AndAlso
Not IsNothing(m_refQParameterListVM) AndAlso Not IsNothing(m_refFeatureManagerVM) AndAlso
Not IsNothing(m_refAddSectionXMaterialWndVM) AndAlso LibMap.EndInit()
Not IsNothing(m_refAddSectionXMaterialWndVM) AndAlso Not IsNothing(m_refElementLayerTreeViewVM) AndAlso
Not IsNothing(m_refLayersWallLeftPanelVM) AndAlso Not IsNothing(m_refLayersWallBottomPanelVM) AndAlso
Not IsNothing(m_refLayersWallPartManagerVM) AndAlso Not IsNothing(m_refLayersWallProjManagerVM) AndAlso LibMap.EndInit()
End Function
#End Region ' Init