Compare commits
102 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25af98b6e8 | |||
| b48b63bd4d | |||
| 05feb0ab8b | |||
| deca9cd4c0 | |||
| 8b36b65b37 | |||
| 06899fadfd | |||
| 80e9ea4c15 | |||
| ad47a070ef | |||
| d99ea84058 | |||
| 069df21cfa | |||
| 7def1b8d5d | |||
| 82aea136c2 | |||
| 55260fe380 | |||
| 4bdbba6599 | |||
| 0d38b47f24 | |||
| 2332eccef9 | |||
| a3481659f2 | |||
| 4b90d2e915 | |||
| bb0a3b385a | |||
| 0c82debdf4 | |||
| 995650aac2 | |||
| f7a85a0680 | |||
| 910e54cae8 | |||
| ea2cb64886 | |||
| c785adbcdf | |||
| 9546248819 | |||
| 13b2dd29d1 | |||
| 55879d431e | |||
| 43268045a1 | |||
| 5abbb927a7 | |||
| 9aa89adf29 | |||
| e1184b723c | |||
| f68b4384e0 | |||
| 6188c67845 | |||
| 5dbacabbac | |||
| e66b65c3ba | |||
| 1874f0aa4b | |||
| 966b8ea26d | |||
| 854cd2a937 | |||
| 73ede8520a | |||
| fb3a53be59 | |||
| af8fbf8a3d | |||
| a2da16761f | |||
| 7f964cd55b | |||
| 95a1cc8f3c | |||
| 963c515da4 | |||
| 1f654dc708 | |||
| 5febbf0805 | |||
| 09baa238d8 | |||
| 6c580fecdb | |||
| 616e1fba47 | |||
| ab5defd090 | |||
| e29abf6a4f | |||
| 64beb381ca | |||
| 7f5d678dbd | |||
| d781989da9 | |||
| 387d1241b2 | |||
| c2f4d38d32 | |||
| d731248ffc | |||
| 701071aab0 | |||
| 24bb030080 | |||
| 9de7422f1a | |||
| e69f85e5e1 | |||
| f6c736ef40 | |||
| 0d134324da | |||
| a224660a00 | |||
| 580a454ad1 | |||
| 971628a549 | |||
| ec73d2944b | |||
| caf0a0ea3a | |||
| 83fd6bda1b | |||
| a624b67848 | |||
| c244f3e87b | |||
| 487efdd029 | |||
| a9e961a0ee | |||
| c53c9f090b | |||
| 46f82e0286 | |||
| 05b2b1d73f | |||
| ca00c134e9 | |||
| b2eba855ac | |||
| 47be6b2859 | |||
| ea54e9dc50 | |||
| 6d13c9478b | |||
| 49ed63e2d4 | |||
| 330a4d6238 | |||
| a12ab8f531 | |||
| df9ee8bdb4 | |||
| b290bdf8a1 | |||
| 316a22d4bb | |||
| 651c1e32af | |||
| 114255bb87 | |||
| 4499a042f8 | |||
| f9f0d90334 | |||
| f8a9eb544d | |||
| 80f06890c4 | |||
| 14e7c35b6a | |||
| a1b5053ca1 | |||
| c1986982ec | |||
| e75a9915aa | |||
| 65f1458ec1 | |||
| 7005a2dfb6 | |||
| 958421f4f5 |
@@ -1,7 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -131,6 +129,16 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_VARIANTList As New ObservableCollection(Of Integer)()
|
||||
Public Property VARIANTList As ObservableCollection(Of Integer)
|
||||
Get
|
||||
Return m_VARIANTList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of Integer))
|
||||
m_VARIANTList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_sDES As String = String.Empty
|
||||
Public Property sDES As String
|
||||
Get
|
||||
@@ -141,6 +149,16 @@ Public Class BTLFeatureM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overridable Property nSelVARIANT As Integer
|
||||
Get
|
||||
Dim nDes As Integer = 0
|
||||
Return If(Integer.TryParse(m_sDES, nDes), nDes, 0)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_sDES = value.ToString()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected m_frFRAME As New Frame3d
|
||||
Public Property frFRAME As Frame3d
|
||||
Get
|
||||
@@ -244,6 +262,7 @@ Public Class BTLFeatureM
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Protected Sub New()
|
||||
CreateVariantList()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateNewBTLFeature() As BTLFeatureM
|
||||
@@ -258,7 +277,7 @@ Public Class BTLFeatureM
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_GRP, NewBTLFeature.m_nSelGRP)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRC, NewBTLFeature.m_nPRC)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_SIDE, NewBTLFeature.m_nSelSIDE)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, NewBTLFeature.m_nPRIORITY)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, NewBTLFeature.m_nPriority)
|
||||
Dim nDO As Integer = 1
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_DO, nDO) Then
|
||||
NewBTLFeature.m_bDO = (nDO <> 0)
|
||||
@@ -321,13 +340,24 @@ Public Class BTLFeatureM
|
||||
.m_nSelGRP = nGRP,
|
||||
.m_nSelSIDE = nSIDE,
|
||||
.m_nPriority = 0,
|
||||
.m_bDO = True
|
||||
.m_bDO = True,
|
||||
.nSelVARIANT = 0
|
||||
}
|
||||
' crea parametri per questa feature da file ini
|
||||
NewBTLFeature.CreateFeatureParams(NewBTLFeature)
|
||||
Return NewBTLFeature
|
||||
End Function
|
||||
|
||||
Private Sub CreateVariantList()
|
||||
Dim sMaxIndex As String = ""
|
||||
Dim nMaxIndex As Integer = 0
|
||||
EgtUILib.GetPrivateProfileString([VARIANT], K_MAXINDEX, "", sMaxIndex, m_sBTLIniFile)
|
||||
Integer.TryParse(sMaxIndex, nMaxIndex)
|
||||
For Index As Integer = 0 To nMaxIndex
|
||||
m_VARIANTList.Add(Index)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
@@ -363,15 +393,21 @@ Public Class BTLFeatureM
|
||||
Dim TempList As New List(Of BTLParamM)
|
||||
Dim NewBTLParam As BTLParamM = Nothing
|
||||
' leggo tutti i P della feature
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, True, ParamIndex, Me, NewBTLParam)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, True, ParamIndex, Me, NewBTLParam)
|
||||
TempList.Add(NewBTLParam)
|
||||
ParamIndex += 1
|
||||
End While
|
||||
If TempList.Count <= 0 Then
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, 0, True, ParamIndex, Me, NewBTLParam)
|
||||
TempList.Add(NewBTLParam)
|
||||
ParamIndex += 1
|
||||
End While
|
||||
End If
|
||||
NewBTLFeature.PBTLParamMList = TempList
|
||||
' leggo tutti i Q della feature
|
||||
ParamIndex = 1
|
||||
TempList = New List(Of BTLParamM)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, False, ParamIndex, Me, NewBTLParam)
|
||||
While BTLIniFile.GetBeamPrivateProfileParam(m_nSelGRP, m_nPRC, nSelVARIANT, False, ParamIndex, Me, NewBTLParam)
|
||||
TempList.Add(NewBTLParam)
|
||||
ParamIndex += 1
|
||||
End While
|
||||
@@ -436,7 +472,6 @@ Public Class BTLFeatureM
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_MSG)
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_FALL)
|
||||
EgtRemoveInfo(BTLPartM.m_nPartId, ITG_PROJ_ROT)
|
||||
'EgtDuploSetModified(DirectCast(m_ParentPart, BTLPartM).m_nPartId)
|
||||
End If
|
||||
' Ripristino stato segnalazione modifica
|
||||
DisableMgr.ReEnable()
|
||||
@@ -504,9 +539,6 @@ Public Class BTLFeatureM
|
||||
vTempPar(BTLPar.nId - 1) = BTLPar.dValue
|
||||
Case BTLParamType.STRING_
|
||||
sTempPar = BTLPar.sValue
|
||||
'Case BTLParamType.COMBO
|
||||
' Dim cBTLPar As BTLParamCombo = DirectCast(ParentFeature.PParamList(ParIndex), BTLParamCombo)
|
||||
' vPar(ParIndex) = cBTLPar.
|
||||
End Select
|
||||
Next
|
||||
vPar = vTempPar
|
||||
@@ -546,7 +578,7 @@ Public Class BTLFeatureM
|
||||
For Each QPar In QBTLParamMList
|
||||
If QPar.bCustom Then EgtSetInfo(nFeatureId, QPar.sName & "A", 1)
|
||||
Next
|
||||
EgtSetInfo( nFeatureId, BTL_FTR_PRIORITY, nPriority)
|
||||
EgtSetInfo(nFeatureId, BTL_FTR_PRIORITY, nPriority)
|
||||
SetFeatureId(nFeatureId)
|
||||
' imposto modificato per copie
|
||||
MyMachGroupPanelM.SetDuploModified(ParentPart.nPartId)
|
||||
@@ -599,6 +631,11 @@ Public Class BTLFeatureM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' funzione che restituisce se la feature è un Variant
|
||||
Public Function IsVariant() As Boolean
|
||||
Return m_nPRC = 900
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class BTLParamM
|
||||
|
||||
@@ -304,33 +299,6 @@ Public Class BTLParamM
|
||||
Return NewBTLParam
|
||||
End Function
|
||||
|
||||
'' new per double e length
|
||||
'Sub New(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, dMin As Double, dMax As Double, dDefault As Double, sDescription As String)
|
||||
' StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
' m_dMin = dMin
|
||||
' m_dMax = dMax
|
||||
' m_dDefault = dDefault
|
||||
'End Sub
|
||||
|
||||
'' new per stringhe
|
||||
'Sub New(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, sDescription As String)
|
||||
' StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
'End Sub
|
||||
|
||||
'' new per combobox
|
||||
'Sub New(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, nMin As Integer, nMax As Integer, nDefault As Integer, sDescription As String, ValueList As List(Of String))
|
||||
' StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
|
||||
' m_dMin = nMin
|
||||
' m_dMax = nMax
|
||||
' m_dDefault = nDefault
|
||||
' m_ValueList = ValueList
|
||||
'End Sub
|
||||
|
||||
'' new per parametro vuoto
|
||||
'Sub New(IsP As Boolean, nType As BTLParamType, sParamName As String)
|
||||
' StdInit(Nothing, IsP, nType, sParamName, "")
|
||||
'End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
@@ -4,14 +4,6 @@ Imports EgtWPFLib5
|
||||
|
||||
Public Class BTLPartM
|
||||
|
||||
'' Feature a cui appartiene il parametro
|
||||
'Public m_BTLStructureM As BTLStructureM
|
||||
'Public ReadOnly Property BTLStructureM As BTLStructureM
|
||||
' Get
|
||||
' Return m_BTLStructureM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
' Id geometrico del pezzo
|
||||
Public m_nPartId As Integer
|
||||
Public ReadOnly Property nPartId As Integer
|
||||
@@ -26,6 +18,17 @@ Public Class BTLPartM
|
||||
End Property
|
||||
|
||||
' Info del pezzo
|
||||
|
||||
Public m_nPROJ As Integer
|
||||
Public Property nPROJ As Integer
|
||||
Get
|
||||
Return m_nPROJ
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPROJ = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_nPDN As Integer
|
||||
Public Property nPDN As Integer
|
||||
Get
|
||||
@@ -760,6 +763,7 @@ Public Class BTLPartM
|
||||
Dim sValArray() As String
|
||||
Dim sValue As String = String.Empty
|
||||
Dim nValue As Integer = 0
|
||||
EgtGetInfo(nPartId, BTL_PRT_PROJ, NewBTLPart.m_nPROJ)
|
||||
EgtGetInfo(nPartId, BTL_PRT_PDN, NewBTLPart.m_nPDN)
|
||||
Dim nDO As Integer = 1
|
||||
If EgtGetInfo(nPartId, BTL_PRT_DO, nDO) Then
|
||||
@@ -840,7 +844,7 @@ Public Class BTLPartM
|
||||
If pTo >= 0 Then
|
||||
NewBTLPart.m_SelREFSIDEFIXCLAMP = IdNameStruct.IndFromId(IdNameStruct.IdFromName(sValue.Substring(pFrom, pTo - pFrom),
|
||||
NewBTLPart.ocREFSIDEFIXCLAMP),
|
||||
NewBTLPart.ocREFSIDEFIXCLAMP)
|
||||
NewBTLPart.ocREFSIDEFIXCLAMP)
|
||||
End If
|
||||
|
||||
Dim EnumIndex As Integer = 0
|
||||
@@ -876,7 +880,6 @@ Public Class BTLPartM
|
||||
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)
|
||||
@@ -900,18 +903,16 @@ Public Class BTLPartM
|
||||
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)
|
||||
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)
|
||||
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
|
||||
|
||||
@@ -1001,197 +1002,6 @@ Public Class BTLPartM
|
||||
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
|
||||
' StringToLenAdv(sValArray(0), ptOri.x)
|
||||
' StringToLenAdv(sValArray(1), ptOri.y)
|
||||
' StringToLenAdv(sValArray(2), ptOri.z)
|
||||
' StringToDoubleAdv(sValArray(3), vtVersX.x)
|
||||
' StringToDoubleAdv(sValArray(4), vtVersX.y)
|
||||
' StringToDoubleAdv(sValArray(5), vtVersX.z)
|
||||
' StringToDoubleAdv(sValArray(6), vtVersY.x)
|
||||
' StringToDoubleAdv(sValArray(7), vtVersY.y)
|
||||
' StringToDoubleAdv(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
|
||||
' StringToLenAdv(sValArray(3), m_dCamberLen1)
|
||||
' StringToLenAdv(sValArray(5), m_dCamberLen2)
|
||||
' StringToLenAdv(sValArray(7), m_dCamberLen3)
|
||||
' StringToLenAdv(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
|
||||
' StringToLenAdv(sValArray(3), m_dPartOffsetSide1)
|
||||
' StringToLenAdv(sValArray(5), m_dPartOffsetSide2)
|
||||
' StringToLenAdv(sValArray(7), m_dPartOffsetSide3)
|
||||
' StringToLenAdv(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
|
||||
' StringToDoubleAdv(sValArray(0), m_refGrainDir.x)
|
||||
' StringToDoubleAdv(sValArray(1), m_refGrainDir.y)
|
||||
' StringToDoubleAdv(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"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class BTLStructureM
|
||||
@@ -175,7 +174,7 @@ Public Class BTLStructureM
|
||||
End Property
|
||||
|
||||
Public m_ocRANGE As New List(Of Object)({New IdNameStruct(Range.STANDARD, EgtMsg(61710)),
|
||||
New IdNameStruct(Range.EXTENDED, EgtMsg(61711))})
|
||||
New IdNameStruct(Range.EXTENDED, EgtMsg(61711))})
|
||||
Public ReadOnly Property ocRANGE As List(Of Object)
|
||||
Get
|
||||
Return m_ocRANGE
|
||||
@@ -193,8 +192,8 @@ Public Class BTLStructureM
|
||||
End Property
|
||||
|
||||
Public m_ocPROCESSINGQUALITY As New List(Of Object)({New IdNameStruct(ProcessingQuality.AUTOMATIC, EgtMsg(61658)),
|
||||
New IdNameStruct(ProcessingQuality.VISIBLE, EgtMsg(61659)),
|
||||
New IdNameStruct(ProcessingQuality.FAST, EgtMsg(61660))})
|
||||
New IdNameStruct(ProcessingQuality.VISIBLE, EgtMsg(61659)),
|
||||
New IdNameStruct(ProcessingQuality.FAST, EgtMsg(61660))})
|
||||
Public ReadOnly Property ocPROCESSINGQUALITY As List(Of Object)
|
||||
Get
|
||||
Return m_ocPROCESSINGQUALITY
|
||||
@@ -252,7 +251,7 @@ Public Class BTLStructureM
|
||||
End Property
|
||||
|
||||
Public m_ocRECESS As New List(Of Object)({New IdNameStruct(Recess.AUTOMATIC, EgtMsg(61658)),
|
||||
New IdNameStruct(Recess.MANUAL, EgtMsg(61661))})
|
||||
New IdNameStruct(Recess.MANUAL, EgtMsg(61661))})
|
||||
Public ReadOnly Property ocRECESS As List(Of Object)
|
||||
Get
|
||||
Return m_ocRECESS
|
||||
@@ -436,11 +435,6 @@ Public Class BTLStructureM
|
||||
If NewBTLStructure.m_nPROJTYPE <> BWType.NULL Then BTLIniFile.m_nBTLBWType = NewBTLStructure.m_nPROJTYPE
|
||||
' recupero i part
|
||||
NewBTLStructure.m_BTLPartMList = LoadParts(ProjId)
|
||||
'Dim nPartId As Integer = EgtGetFirstPart()
|
||||
'While nPartId <> GDB_ID.NULL
|
||||
' NewBTLStructure.m_BTLPartMList.Add(BTLPartM.CreateBTLPart(nPartId))
|
||||
' nPartId = EgtGetNextPart(nPartId)
|
||||
'End While
|
||||
Return NewBTLStructure
|
||||
End Function
|
||||
|
||||
@@ -483,7 +477,6 @@ Public Class BTLStructureM
|
||||
If IsNothing(BTLPartM) Then Return
|
||||
If Not m_BTLPartMList.Contains(BTLPartM) Then Return
|
||||
m_BTLPartMList.Remove(BTLPartM)
|
||||
'RaiseEvent BTLPartAdded(Me, New BTLPartAddedEventArgs(BTLPartM))
|
||||
End Sub
|
||||
|
||||
Public Function GetBTLParts() As List(Of BTLPartM)
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Media
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -64,6 +60,15 @@ Public Class BTLFeatureVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overridable Property nSelVARIANT As Integer
|
||||
Get
|
||||
Return m_BTLFeatureM.nSelVARIANT
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_BTLFeatureM.nSelVARIANT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Return m_BTLFeatureM.sName
|
||||
@@ -206,19 +211,6 @@ Public Class BTLFeatureVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
'Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
|
||||
' m_BTLFeatureM = BTLFeatureM
|
||||
' AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
|
||||
' AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded
|
||||
' m_BTLPartM = BTLPartM
|
||||
' CreatePBTLParamVMList()
|
||||
' CreateQBTLParamVMList()
|
||||
' NotifyPropertyChanged(NameOf(Calc_Background))
|
||||
' NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
|
||||
' NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
|
||||
' NotifyPropertyChanged(NameOf(CALC_ERR_Foreground))
|
||||
'End Sub
|
||||
|
||||
Sub New()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyBeamMachiningsWindowVM
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdBeamMachiningsWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
Width="500" Height="450"
|
||||
IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TabControl ItemsSource="{Binding MachiningList}"
|
||||
SelectedItem="{Binding SelMachining}"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
Margin="5,0,5,0"
|
||||
Style="{StaticResource OnlyProdTabControl_OnlyHeaders}"/>
|
||||
|
||||
<Border Grid.Row="1" Margin="0,1,0,2" Style="{StaticResource OnlyProdPage_Border}">
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding TableRowList}"
|
||||
SelectedIndex="{Binding SelRowIndex}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="0.5,0.5,0.5,5"
|
||||
BindingColumns="{Binding BeamMachiningsColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderBackground="{StaticResource BeamWall_Teal}"
|
||||
ColumnHeaderForeground="{StaticResource BeamWall_White}"
|
||||
ColumnHeaderHorizontalContentAlignment="Center"
|
||||
ColumnHeaderFontWeight="Bold"
|
||||
ColumnHeaderFontSize="15"
|
||||
ColumnHeaderPadding="0,2,0,2"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource DataGrid_OnlyProd}">
|
||||
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="Height" Value="25"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.Resources>
|
||||
<Style x:Key="DataGridCheckBoxColumn_Style"
|
||||
TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--Colonna On-->
|
||||
<DataGridCheckBoxColumn x:Key="colON" Binding="{Binding OnPar, UpdateSourceTrigger=PropertyChanged}"
|
||||
CellStyle="{StaticResource DataGridCheckBoxColumn_Style}">
|
||||
<DataGridCheckBoxColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</DataGridCheckBoxColumn.Header>
|
||||
</DataGridCheckBoxColumn>
|
||||
|
||||
<!--Colonna Name-->
|
||||
<DataGridTemplateColumn x:Key="colNAME">
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsEditable="False"
|
||||
SelectedItem="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=NamesList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="5,0,0,0"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<!--Colonna Style-->
|
||||
<DataGridTemplateColumn x:Key="colTYPE">
|
||||
<DataGridTemplateColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.TypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsEditable="False"
|
||||
SelectedItem="{Binding Type,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=TypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Type,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="5,0,0,0"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
</DataGrid.Resources>
|
||||
|
||||
</EgtBEAMWALL:EgtDataGrid>
|
||||
</Border>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,0,0,5"
|
||||
HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Content="/\"
|
||||
Command="{Binding MoveRowUp_Command}"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="\/"
|
||||
Command="{Binding MoveRowDown_Command}"
|
||||
Grid.Column="1"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding AddRowMsg}"
|
||||
Command="{Binding AddRow_Command}"
|
||||
Grid.Column="2"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding DeleteRowMsg}"
|
||||
Command="{Binding DeleteRow_Command}"
|
||||
Grid.Column="3"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding SaveMsg}"
|
||||
Command="{Binding Save_Command}"
|
||||
Grid.Column="4"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class OnlyProdBeamMachiningsWindowV
|
||||
|
||||
Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM
|
||||
|
||||
Sub New(Owner As System.Windows.Window, BeamMachiningsWindowVM As MyBeamMachiningsWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = BeamMachiningsWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_BeamMachiningsWindowVM = BeamMachiningsWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -3,8 +3,6 @@ Imports System.Threading
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Module CalcIntegration
|
||||
|
||||
@@ -151,8 +149,8 @@ Public Module CalcIntegration
|
||||
vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """"
|
||||
Else
|
||||
vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """ " &
|
||||
"""" & vBar(nCurrBar).nProjType & """ " &
|
||||
"""" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType
|
||||
"""" & vBar(nCurrBar).nProjType & """ " &
|
||||
"""" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType
|
||||
End If
|
||||
vProc(j).Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
@@ -166,7 +164,6 @@ Public Module CalcIntegration
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(nCurrBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
ElseIf vBar(nCurrBar).nCmdType = CmdTypes.GENERATE Then
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(nCurrBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
'RaiseEvent Calc_ProcessEnd(Nothing, New CalcProcessEndEventArgs(vBar(nCurrBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
End If
|
||||
bDone = True
|
||||
nCurrBar += 1
|
||||
@@ -182,7 +179,6 @@ Public Module CalcIntegration
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
ElseIf vBar(vProc(j).nBar).nCmdType = CmdTypes.GENERATE Then
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
'RaiseEvent Calc_ProcessEnd(Nothing, New CalcProcessEndEventArgs(vBar(vProc(j).nBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
End If
|
||||
bDone = True
|
||||
vProc(j).nBar = -1
|
||||
@@ -205,7 +201,6 @@ Public Module CalcIntegration
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
ElseIf vBar(vProc(j).nBar).nCmdType = CmdTypes.GENERATE Then
|
||||
RaiseEvent Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
'RaiseEvent Calc_ProcessEnd(Nothing, New CalcProcessEndEventArgs(vBar(vProc(j).nBar))) 'ProcessResults(vBar(nCurrBar))
|
||||
End If
|
||||
bDone = True
|
||||
vProc(j).nBar = -1
|
||||
@@ -233,8 +228,8 @@ Public Module CalcIntegration
|
||||
Dim Proc As New Process()
|
||||
Proc.StartInfo.FileName = ExePath
|
||||
Proc.StartInfo.Arguments = """" & vBar(0).sBarPath & """ " &
|
||||
"""" & vBar(0).nProjType & """ " &
|
||||
"""" & vBar(0).nMachineName & """ " & CmdTypes.CHECKGEN
|
||||
"""" & vBar(0).nProjType & """ " &
|
||||
"""" & vBar(0).nMachineName & """ " & CmdTypes.CHECKGEN
|
||||
Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
If Proc.Start() Then
|
||||
@@ -416,11 +411,6 @@ Public Module CalcIntegration
|
||||
Dim nTaskId As Integer = nOutlineId
|
||||
If EgtGetInfo(nOutlineId, BTL_FTR_MAINID, nMainOffsId) Then
|
||||
nTaskId = nOutlineId + nMainOffsId
|
||||
'' assegno TASKID alla feature per calcoli
|
||||
'EgtSetInfo(nOutlineId, "TASKID", nOutlineId + nMainOffsId, True)
|
||||
'Else
|
||||
' ' assegno TASKID alla feature per calcoli
|
||||
' EgtSetInfo(nOutlineId, "TASKID", nOutlineId, True)
|
||||
End If
|
||||
' assegno TASKID alla feature per calcoli
|
||||
EgtSetInfo(nOutlineId, "TASKID", nTaskId)
|
||||
@@ -455,11 +445,6 @@ Public Module CalcIntegration
|
||||
Dim nTaskId As Integer = nFeatureId
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_MAINID, nMainOffsId) Then
|
||||
nTaskId = nFeatureId + nMainOffsId
|
||||
' ' assegno TASKID alla feature per calcoli
|
||||
' EgtSetInfo(nFeatureId, "TASKID", nFeatureId + nMainOffsId, True)
|
||||
'Else
|
||||
' ' assegno TASKID alla feature per calcoli
|
||||
' EgtSetInfo(nFeatureId, "TASKID", nFeatureId, True)
|
||||
End If
|
||||
' assegno TASKID alla feature per calcoli
|
||||
EgtSetInfo(nFeatureId, "TASKID", nTaskId)
|
||||
@@ -485,7 +470,6 @@ Public Module CalcIntegration
|
||||
End Module
|
||||
|
||||
Public Class Bar
|
||||
'Public piInfo As PatternInfo
|
||||
Public nBarState As Integer
|
||||
Public nBarId As Integer
|
||||
Public sBarPath As String
|
||||
@@ -593,4 +577,13 @@ Public Class ProcessResult
|
||||
m_nTIME = TIME
|
||||
End Sub
|
||||
|
||||
Public Sub ResetTypeFeature()
|
||||
m_Type = ProcessResultTypes.PART
|
||||
m_nTASKID = 0
|
||||
End Sub
|
||||
Public Sub ResetTypePart()
|
||||
m_Type = ProcessResultTypes.BAR
|
||||
m_nCUTID = 0
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
<UniformGrid Rows="2" Margin="3,3,3,3">
|
||||
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
||||
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
|
||||
Margin="0,0,0,5"/>
|
||||
Margin="0,0,0,5"
|
||||
Style="{x:Null}"/>
|
||||
<TextBlock Text="{Binding LanguageAdvert_Msg}" TextWrapping="Wrap"
|
||||
TextAlignment="Center"/>
|
||||
</UniformGrid>
|
||||
@@ -28,7 +29,8 @@
|
||||
<TextBlock Text="{Binding MMUnits_Msg}" VerticalAlignment="Center"/>
|
||||
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelMeasureUnit}" Height="25"
|
||||
Margin="0,5,0,0"/>
|
||||
Margin="0,5,0,0"
|
||||
Style="{x:Null}"/>
|
||||
</UniformGrid>
|
||||
<GroupBox Header="{Binding Nesting_Msg}"
|
||||
Margin="0,0,0,5">
|
||||
@@ -100,7 +102,8 @@
|
||||
<TextBlock Text="Reminder Frequency"/>
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding ReminderList}"
|
||||
SelectedItem="{Binding SelReminder}"/>
|
||||
SelectedItem="{Binding SelReminder}"
|
||||
Style="{x:Null}"/>
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="3"
|
||||
Orientation="Horizontal">
|
||||
|
||||
@@ -12,50 +12,52 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Margin="5,5,5,0">
|
||||
<StackPanel Margin="5,5,5,0">
|
||||
<GroupBox Header="{Binding CurrentLanguage_Msg}"
|
||||
Margin="0,0,0,5">
|
||||
Margin="0,0,0,5"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<UniformGrid Rows="2" Margin="3,3,3,3">
|
||||
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
|
||||
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
|
||||
Margin="0,0,0,5"/>
|
||||
Margin="0,0,0,5" Style="{StaticResource OnlyProd_ComboBox}" />
|
||||
<TextBlock Text="{Binding LanguageAdvert_Msg}" TextWrapping="Wrap"
|
||||
TextAlignment="Center"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding MMUnits_Msg}" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding MMUnits_Msg}" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelMeasureUnit}" Height="25"
|
||||
Margin="0,5,0,0"/>
|
||||
Margin="0,5,0,0" Style="{StaticResource OnlyProd_ComboBox}" />
|
||||
</UniformGrid>
|
||||
<GroupBox Header="{Binding Nesting_Msg}"
|
||||
Margin="0,0,0,5">
|
||||
Margin="0,0,0,5"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<StackPanel>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding SectionTime_Msg}"
|
||||
Grid.Row="0" Grid.Column="0"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"
|
||||
Grid.Row="0" Grid.Column="1"/>
|
||||
<TextBlock Text="{Binding SectionTime_Msg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding PartTime_Msg}"
|
||||
Grid.Row="1" Grid.Column="0"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding PartTime, UpdateSourceTrigger=Explicit}"
|
||||
Grid.Row="1" Grid.Column="1"/>
|
||||
<TextBlock Grid.Row="1" Text="{Binding PartTime_Msg}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding PartTime, UpdateSourceTrigger=Explicit}"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<UniformGrid Columns="2"
|
||||
Margin="0,0,0,5">
|
||||
<TextBlock Text="{Binding PrintLabel_Msg}" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding PrintLabel_Msg}" VerticalAlignment="Center" Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<CheckBox IsChecked="{Binding bPrintLabel_IsChecked}"
|
||||
Margin="0,5,0,0"/>
|
||||
</UniformGrid>
|
||||
<GroupBox Header="Backup And Restore">
|
||||
<GroupBox Header="Backup And Restore"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -63,8 +65,7 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0"
|
||||
Margin="0,2,0,5">
|
||||
<Grid Margin="0,2,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -87,10 +88,13 @@
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Grid.Column="1"
|
||||
Content="..."
|
||||
Width="18"
|
||||
Foreground="{StaticResource BeamWall_White}"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding ChooseExternalBackupFolderPath_Command}"
|
||||
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -100,16 +104,18 @@
|
||||
<TextBlock Text="Reminder Frequency"/>
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding ReminderList}"
|
||||
SelectedItem="{Binding SelReminder}"/>
|
||||
SelectedItem="{Binding SelReminder}"
|
||||
Margin="0,0,0,5" Style="{StaticResource OnlyProd_ComboBox}" />
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="3"
|
||||
Orientation="Horizontal">
|
||||
<Button Content="Backup"
|
||||
Command="{Binding Backup_Command}"
|
||||
Style="{StaticResource ToolBar_TextButton}"/>
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"
|
||||
Margin="0,0,5,0"/>
|
||||
<Button Content="Restore"
|
||||
Command="{Binding Restore_Command}"
|
||||
Style="{StaticResource ToolBar_TextButton}"/>
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
<RowDefinition Height="10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<GroupBox Style="{StaticResource GroupBoxStyle_NoHeader}" Padding="5,10,5,5">
|
||||
<EgtBEAMWALL:MachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
|
||||
<EgtBEAMWALL:OnlyProdMachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Visibility="{Binding MachineParameter_Visibility}">
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Visibility="{Binding MachineParameter_Visibility}">
|
||||
<ItemsControl ItemsSource="{Binding ConfigMachTableList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
@@ -28,7 +28,7 @@
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<GroupBox Header="{Binding sName}" Width="Auto" VerticalAlignment="Top" Height="Auto">
|
||||
<GroupBox Header="{Binding sName}" Width="Auto" VerticalAlignment="Top" Height="Auto" Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<ItemsControl Name="MachParamsItemsControl" ItemsSource="{Binding MachParamList}" Margin="0,5,0,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
@@ -46,17 +46,17 @@
|
||||
<TextBlock Text="{Binding sName}"
|
||||
ToolTip="{Binding sName}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="190"
|
||||
Width="150"
|
||||
Style="{StaticResource MachParamTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||
Grid.Column="1"
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||
Width="60"/>
|
||||
<TextBlock Text="{Binding sDescription}"
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding sDescription}"
|
||||
ToolTip="{Binding sDescription}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
Width="185"
|
||||
Style="{StaticResource MachParamTextBlock}"
|
||||
Grid.Column="2"/>
|
||||
Width="148"
|
||||
Style="{StaticResource MachParamTextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
@@ -67,12 +67,11 @@
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
|
||||
<Button Command="{Binding SaveCommand}"
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
<Button Grid.Row="1"
|
||||
Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding Machine_Visibility}"
|
||||
Style="{StaticResource MachinePanel_Button}">
|
||||
Style="{StaticResource SaveMachinePanel_Button}">
|
||||
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<EgtBEAMWALL:QParamListV DataContext="{Binding}"
|
||||
ItemsSource="{Binding QBTLParamVMList}"
|
||||
SelectedItem="{Binding SelQParam}"
|
||||
Grid.Column="0"
|
||||
Margin="5">
|
||||
|
||||
<Border Style="{StaticResource OnlyProdPage_Border}"/>
|
||||
|
||||
<EgtBEAMWALL:OnlyProd_QParamListV DataContext="{Binding}"
|
||||
ItemsSource="{Binding QBTLParamVMList}"
|
||||
SelectedItem="{Binding SelQParam}"
|
||||
Margin="5">
|
||||
<DataGrid.GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.Panel>
|
||||
@@ -36,11 +38,11 @@
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True">
|
||||
<Expander.Background>
|
||||
<SolidColorBrush Color="#FFBABABA"></SolidColorBrush>
|
||||
<SolidColorBrush Color="#FFBABABA"/>
|
||||
</Expander.Background>
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Path=Name}" />
|
||||
<TextBlock Text="{Binding Path=Name}"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<ItemsPresenter />
|
||||
@@ -59,11 +61,11 @@
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True">
|
||||
<Expander.Background>
|
||||
<SolidColorBrush Color="LightGray"></SolidColorBrush>
|
||||
<SolidColorBrush Color="LightGray"/>
|
||||
</Expander.Background>
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Path=Name}" />
|
||||
<TextBlock Text="{Binding Path=Name}"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<ItemsPresenter />
|
||||
@@ -75,6 +77,6 @@
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
</DataGrid.GroupStyle>
|
||||
</EgtBEAMWALL:QParamListV>
|
||||
</EgtBEAMWALL:OnlyProd_QParamListV>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True">
|
||||
<Expander IsExpanded="True" Style="{x:Null}">
|
||||
<Expander.Background>
|
||||
<SolidColorBrush Color="#FFBABABA"></SolidColorBrush>
|
||||
</Expander.Background>
|
||||
@@ -57,7 +57,7 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="True">
|
||||
<Expander IsExpanded="True" Style="{x:Null}">
|
||||
<Expander.Background>
|
||||
<SolidColorBrush Color="LightGray"></SolidColorBrush>
|
||||
</Expander.Background>
|
||||
|
||||
@@ -104,9 +104,6 @@
|
||||
|
||||
Public Const BTLFEATURES_FILE_NAME As String = "BTLFeatures.ini"
|
||||
|
||||
'Public Const S_GENERAL As String = "General"
|
||||
'Public Const K_DEBUG As String = "Debug"
|
||||
|
||||
' Tipo di progetto
|
||||
Public Enum ProjectType As Integer
|
||||
PROJ = 1
|
||||
@@ -171,7 +168,6 @@
|
||||
Public Const BTL_PRT_ELEMENTNUM = "ELEMENTNUMBER"
|
||||
Public Const BTL_PRT_LAYER = "LAYER"
|
||||
Public Const BTL_PRT_MODULENUM = "MODULENUMBER"
|
||||
'Friend Const BTL_PRT_USERATTRIBUTE = "USERATTRIBUTE"
|
||||
Public Const BTL_PRT_COMMENT = "COMMENT"
|
||||
Public Const BTL_PRT_GRAINDIR = "GRAINDIRECTION"
|
||||
Public Const BTL_PRT_REFSIDE = "REFERENCESIDE"
|
||||
@@ -203,12 +199,14 @@
|
||||
Public Const BTL_GEN_USERATTRIBUTE = "USERATTRIBUTE"
|
||||
|
||||
Public Const PROCESSINGS As String = "Processings"
|
||||
Public Const [VARIANT] As String = "Variant"
|
||||
Public Const OUTLINE As String = "Outline"
|
||||
Public Const BTL_FTR_GRP As String = "GRP"
|
||||
Public Const BTL_FTR_PRC As String = "PRC"
|
||||
Public Const BTL_FTR_DO As String = "DO"
|
||||
Public Const BTL_FTR_SIDE As String = "SIDE"
|
||||
Public Const BTL_FTR_PRIORITY As String = "PRIORITY"
|
||||
Public Const BTL_FTR_VARIANT As String = "VARIANT"
|
||||
Public Const BTL_FTR_NAME As String = "NAME"
|
||||
Public Const BTL_FTR_DES As String = "DES"
|
||||
Public Const BTL_FTR_PRID As String = "PRID"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Public Module ConstDataGridColumnsIni
|
||||
|
||||
Public Const DATAGRIDCOLUMNS_FILE_NAME As String = "DataGridColumns.ini"
|
||||
Public Const OPTIMIZERDATAGRIDCOLUMNS_FILE_NAME As String = "OPTIMIZERDataGridColumns.ini"
|
||||
|
||||
Public Const S_FEATURELIST As String = "DG_FeatureList"
|
||||
Public Const S_OPENPROJFILEDLG_PROJ As String = "DG_OpenProjectFileDialog_PROJ"
|
||||
|
||||
@@ -24,6 +24,7 @@ Public Module ConstGen
|
||||
Public Const K_LOCKID As String = "LockId"
|
||||
Public Const K_KEY As String = "Key"
|
||||
Public Const K_NESTKEY As String = "NestKey"
|
||||
Public Const K_MAXINDEX As String = "MaxIndex"
|
||||
|
||||
' Pagine del programma
|
||||
Public Enum Pages As Integer
|
||||
@@ -77,6 +78,12 @@ Public Module ConstGen
|
||||
Public Const BEAM_DIR As String = "Beam"
|
||||
' Sottodirettorio per lavorazioni pareti
|
||||
Public Const WALL_DIR As String = "Wall"
|
||||
' Sottodirettorio per setup strategie
|
||||
Public Const AISETUP_DIR As String = "AISetup"
|
||||
' Sottodirettorio per automarismo strategie
|
||||
Public Const STRATEGIES_DIR As String = "Strategies"
|
||||
' File contenente lista strategie per feature/topologia
|
||||
Public Const AVAILABLESTRATEGYLIST_FILE As String = "AvailableStrategyList"
|
||||
' Sottodirettorio di default per il salvataggio con nome
|
||||
Public Const SAVE_DFL_NAMEDIR As String = "MyProjects"
|
||||
' Sottodirettorio di default per le macchine
|
||||
|
||||
@@ -15,29 +15,17 @@ Public Module ConstIni
|
||||
|
||||
Public Const INI_FILE_NAME As String = "EgtBEAMWALL.ini"
|
||||
|
||||
'Public Const S_GENERAL As String = "General"
|
||||
'Public Const K_DEBUG As String = "Debug"
|
||||
'Public Const K_LICENCE As String = "Licence"
|
||||
'Public Const K_USERLEVEL As String = "UserLevel"
|
||||
'Public Const K_MAXINST As String = "MaxInstances"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_MAXCAMINST As String = "MaxCamInstances"
|
||||
Public Const K_VIEWOPTIM_INSTANCES As String = "ViewOptimInstances"
|
||||
Public Const K_SUPERVISOR_INSTANCES As String = "SupervisorInstances"
|
||||
'Public Const K_COMMANDLOG As String = "CommandLog"
|
||||
'Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
'Public Const K_MESSAGES As String = "Messages"
|
||||
'Public Const K_WINPLACE As String = "WinPlace"
|
||||
Public Const K_VIEWOPTIMWINPLACE As String = "ViewOptimWinPlace"
|
||||
Public Const K_SUPERVISORWINPLACE As String = "SupervisorWinPlace"
|
||||
'Public Const K_LASTPROJ As String = "LastProj"
|
||||
'Public Const K_AUTOLOADLASTPROJ As String = "AutoLoadLastProj"
|
||||
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||
Public Const K_LASTNGEXPDIR As String = "LastNgexpDir"
|
||||
Public Const K_LASTUPDATEDIR As String = "LastUpdateDir"
|
||||
Public Const K_PROJSINDEX As String = "ProjsIndex"
|
||||
Public Const K_PRODSINDEX As String = "ProdsIndex"
|
||||
'Public Const K_SUPPORT As String = "Support"
|
||||
Public Const K_DBADDRESS As String = "DbAddress"
|
||||
Public Const K_DBMASTERKEY As String = "DbMasterKey"
|
||||
Public Const K_SHAREDFOLDER As String = "SharedFolder"
|
||||
@@ -48,51 +36,7 @@ Public Module ConstIni
|
||||
Public Const K_ADDPROJ As String = "AddProj"
|
||||
Public Const K_PROJECTMODE As String = "ProjectMode"
|
||||
|
||||
'Public Const S_LANGUAGES As String = "Languages"
|
||||
'Public Const K_LANGUAGE As String = "Language"
|
||||
|
||||
'Public Const S_LUA As String = "Lua"
|
||||
'Public Const K_LIBSDIR As String = "LibsDir"
|
||||
'Public Const K_BASELIB As String = "BaseLib"
|
||||
|
||||
'Public Const S_GEOMDB As String = "GeomDB"
|
||||
'Public Const K_DEFAULTFONT As String = "DefaultFont"
|
||||
'Public Const K_NFEFONTDIR As String = "NfeFontDir"
|
||||
'Public Const K_DEFAULTCOLOR As String = "DefaultColor"
|
||||
'Public Const K_SAVETYPE As String = "SaveType"
|
||||
|
||||
'Public Const S_OPENGL As String = "OpenGL"
|
||||
'Public Const K_DOUBLEBUFFER As String = "DoubleBuffer"
|
||||
'Public Const K_COLORBITS As String = "ColorBits"
|
||||
'Public Const K_DEPTHBITS As String = "DepthBits"
|
||||
'Public Const K_DRIVER As String = "Driver"
|
||||
|
||||
'Public Const S_SCENE As String = "Scene"
|
||||
'Public Const K_BACKTOP As String = "BackTop"
|
||||
'Public Const K_BACKBOTTOM As String = "BackBottom"
|
||||
'Public Const K_SHOWGFRAME As String = "ShowGFrame"
|
||||
'Public Const K_MARK As String = "Mark"
|
||||
'Public Const K_SELSURF As String = "SelSurf"
|
||||
'Public Const K_SHOWMODE As String = "ShowMode"
|
||||
Public Const K_SHOWBUILDING As String = "ShowBuilding"
|
||||
'Public Const K_CURVEDIR As String = "CurveDir"
|
||||
'Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
|
||||
'Public Const K_SHOWZMAP As String = "ShowZmap"
|
||||
'Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
|
||||
'Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||
'Public Const K_DISTLINE As String = "DistLine"
|
||||
'Public Const K_MMUNITS As String = "MmUnits"
|
||||
|
||||
'Public Const S_GRID As String = "Grid"
|
||||
'Public Const K_SHOWGRID As String = "ShowGrid"
|
||||
'Public Const K_SHOWFRAME As String = "ShowFrame"
|
||||
'Public Const K_SNAPSTEP As String = "SnapStep"
|
||||
'Public Const K_SNAPSTEPINCH As String = "SnapStepInch"
|
||||
'Public Const K_MINLINESSTEP As String = "MinLineSStep"
|
||||
'Public Const K_MAJLINESSTEP As String = "MajLineSStep"
|
||||
'Public Const K_EXTSSTEP As String = "ExtSStep"
|
||||
'Public Const K_MINLNCOLOR As String = "MinLnColor"
|
||||
'Public Const K_MAJLNCOLOR As String = "MajLnColor"
|
||||
|
||||
Public Const S_IMPORT As String = "Import"
|
||||
Public Const K_BTLFLAG As String = "BtlFlag"
|
||||
@@ -100,19 +44,11 @@ Public Module ConstIni
|
||||
Public Const K_BTLAUXDIR As String = "BtlAuxDir"
|
||||
Public Const K_WALLOPPOSITESIDENESTING As String = "WallOppositeSideNesting"
|
||||
|
||||
'Public Const S_MACH As String = "Mach"
|
||||
'Public Const K_MACHINESDIR As String = "MachinesDir"
|
||||
'Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
|
||||
'Public Const K_CURRMACH As String = "CurrMach"
|
||||
Public Const K_SUPERVISORMACH As String = "SupervisorMach"
|
||||
Public Const K_PASSWORD As String = "Password"
|
||||
Public Const K_CHANGEMACH As String = "ChangeMach"
|
||||
Public Const K_EXPORTBWE As String = "ExpBwe"
|
||||
|
||||
'Public Const S_SIMUL As String = "Simul"
|
||||
'Public Const K_SLIDERX As String = "SliderX"
|
||||
'Public Const K_SLIDERVAL As String = "SliderVal"
|
||||
|
||||
Public Const S_BEAM As String = "Beam"
|
||||
Public Const K_CALCPATH As String = "CalcPath"
|
||||
Public Const K_BEAMBASEDIR As String = "BaseDir"
|
||||
@@ -132,7 +68,6 @@ Public Module ConstIni
|
||||
Public Const S_OPENFILEDIALOG As String = "OpenFileDialog"
|
||||
Public Const K_VIEWARCHIVED As String = "ViewArchived"
|
||||
|
||||
'Public Const S_NEST As String = "Nest"
|
||||
Public Const K_NESTEXEC As String = "NestExec"
|
||||
Public Const K_FLIPROT As String = "FlipRot"
|
||||
Public Const K_SECTIONTIME As String = "SectionTime"
|
||||
@@ -176,8 +111,12 @@ Public Module ConstIni
|
||||
|
||||
Public Const K_ONLYPROD As String = "OnlyProd"
|
||||
Public Const K_MODIFYSETUP As String = "ModifySetup"
|
||||
|
||||
Public Const K_MACHCONFIG As String = "MachConfig"
|
||||
|
||||
Public Const S_SPECIAL As String = "Special"
|
||||
Public Const K_SPECIALENABLE As String = "SpecialEnable"
|
||||
|
||||
' Server Address
|
||||
Public Const K_SERVERADDRESS As String = "ServerAddressRelease"
|
||||
Public Const K_BEAMWALL As String = "EgtBeamWall"
|
||||
End Module
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
|
||||
Public Const K_NCTYPE As String = "NCType"
|
||||
Public Const K_CONNECTIONSTRING As String = "ConnectionString"
|
||||
Public Const K_SUPERVISOR As String = "Supervisor"
|
||||
Public Const K_SAVECNCPATH As String = "SaveCncPath"
|
||||
Public Const K_SAVEEXT As String = "SaveExt"
|
||||
|
||||
Public Const S_CHANNELS As String = "Channels"
|
||||
|
||||
@@ -24,5 +27,6 @@
|
||||
Public Const K_FLOW As String = "Flow"
|
||||
|
||||
Public Const TS3DATA_FILE As String = "Ts3Data.lua"
|
||||
Public Const EBWDATA_FILE As String = "EbwData.lua"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -53,11 +53,50 @@
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<HintPath>..\ExtLibs\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgwProxy.LiMan, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EgwProxy.LiMan.1.0.2408.718\lib\EgwProxy.LiMan.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="RestSharp, Version=111.2.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.111.2.0\lib\net471\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=8.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.8.0.3\lib\net462\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml" />
|
||||
@@ -81,6 +120,9 @@
|
||||
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BeamMachiningsWindow\MyBeamMachiningsWindowVM.vb" />
|
||||
<Compile Include="BeamMachiningsWindow\OnlyProdBeamMachiningsWindowV.xaml.vb">
|
||||
<DependentUpon>OnlyProdBeamMachiningsWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BTLViewModel\BTLFeatureVM.vb" />
|
||||
<Compile Include="CALCPanel\CalcEditEndEventArgs.vb" />
|
||||
<Compile Include="ConfigurationPage\OnlyProdMachine_ConfigurationPageV.xaml.vb">
|
||||
@@ -109,6 +151,12 @@
|
||||
<Compile Include="Constants\ConstMachComm.vb" />
|
||||
<Compile Include="Constants\ConstMachIni.vb" />
|
||||
<Compile Include="Constants\ConstMsg.vb" />
|
||||
<Compile Include="EgtColorPicker\EgtColorPickerV.xaml.vb">
|
||||
<DependentUpon>EgtColorPickerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtColorPicker\OnlyProdEgtColorPickerV.xaml.vb">
|
||||
<DependentUpon>OnlyProdEgtColorPickerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtDataGrid\EgtDataGrid.xaml.vb">
|
||||
<DependentUpon>EgtDataGrid.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -119,6 +167,21 @@
|
||||
<Compile Include="CALCPanel\CalcIntegration.vb" />
|
||||
<Compile Include="DataAccess\PartAddedEventArgs.vb" />
|
||||
<Compile Include="DataAccess\BTLParamAddedEventArgs.vb" />
|
||||
<Compile Include="EgtManageFileDialog\EgtManageFileDialogV.xaml.vb">
|
||||
<DependentUpon>EgtManageFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtManageFileDialog\OnlyProdEgtManageFileDialogV.xaml.vb">
|
||||
<DependentUpon>OnlyProdEgtManageFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
|
||||
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EgtMessageBox\OnlyProdEgtMessageBoxV.xaml.vb">
|
||||
<DependentUpon>OnlyProdEgtMessageBoxV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ItemParamList\OnlyProd_QParamListV.xaml.vb">
|
||||
<DependentUpon>OnlyProd_QParamListV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ItemParamList\QParamListV.xaml.vb">
|
||||
<DependentUpon>QParamListV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -137,9 +200,18 @@
|
||||
<DependentUpon>LoadingWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LoadingWnd\LoadingWndVM.vb" />
|
||||
<Compile Include="LoadingWnd\OnlyProdLoadingWndV.xaml.vb">
|
||||
<DependentUpon>OnlyProdLoadingWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachinePanel\OnlyProdMachinePanelV.xaml.vb">
|
||||
<DependentUpon>OnlyProdMachinePanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
||||
<DependentUpon>MachinePanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachiningDbWindow\OnlyProdMachiningDbWindowV.xaml.vb">
|
||||
<DependentUpon>OnlyProdMachiningDbWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogV.xaml.vb">
|
||||
<DependentUpon>NewOpenProjectFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -150,6 +222,12 @@
|
||||
<Compile Include="OpenProjectFileDialog\OnlyProdOpenProjectFileDialogV.xaml.vb">
|
||||
<DependentUpon>OnlyProdOpenProjectFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SetUpWindow\OnlyProdSetUpWindowV.xaml.vb">
|
||||
<DependentUpon>OnlyProdSetUpWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ToolsDbWindow\OnlyProdToolDbWindowV.xaml.vb">
|
||||
<DependentUpon>OnlyProdToolDbWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Configuration.vb" />
|
||||
<Compile Include="ProjectFileVM\ProdItem.vb" />
|
||||
<Compile Include="Utility\DimensionsIniFile.vb" />
|
||||
@@ -211,6 +289,7 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
@@ -220,12 +299,17 @@
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="BeamMachiningsWindow\OnlyProdBeamMachiningsWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ConfigurationPage\OnlyProdMachine_ConfigurationPageV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -250,10 +334,38 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtColorPicker\EgtColorPickerV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtColorPicker\OnlyProdEgtColorPickerV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtDataGrid\EgtDataGrid.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="EgtManageFileDialog\EgtManageFileDialogV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtManageFileDialog\OnlyProdEgtManageFileDialogV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EgtMessageBox\OnlyProdEgtMessageBoxV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ItemParamList\OnlyProd_QParamListV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="ItemParamList\QParamListV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -262,10 +374,22 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="LoadingWnd\OnlyProdLoadingWndV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MachinePanel\OnlyProdMachinePanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MachinePanel\MachinePanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="MachiningDbWindow\OnlyProdMachiningDbWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -282,6 +406,14 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SetUpWindow\OnlyProdSetUpWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ToolsDbWindow\OnlyProdToolDbWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ViewPanel\ViewPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -293,6 +425,7 @@
|
||||
<ItemGroup>
|
||||
<Service Include="{94E38DFF-614B-4CBD-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.Core.dll</PostBuildEvent>
|
||||
|
||||
@@ -0,0 +1,268 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="EgtColorPickerV"
|
||||
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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Width="750" Height="450"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl>
|
||||
<TabItem Header="{Binding BasicColor_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColors}"
|
||||
SelectedItem="{Binding SelColor}"
|
||||
HorizontalAlignment="Center"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPicker_Msg}">
|
||||
<TabItem.Resources>
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="BorderThickness" Value="1.5"/>
|
||||
<Setter Property="BorderBrush" Value="White"/>
|
||||
</Style>
|
||||
</TabItem.Resources>
|
||||
<EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
|
||||
SelectedItem="{Binding sHexSelColor}"
|
||||
Orientation="Vertical"
|
||||
Margin="2.5"
|
||||
RowCount="13"
|
||||
ColumnCount="13"
|
||||
Height="300"
|
||||
Width="350"
|
||||
Style="{StaticResource EgtHexList}">
|
||||
<EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<DataTemplate/>
|
||||
</EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||
<Style TargetType="EgtWPFLib5:EgtHexItem" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
|
||||
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
</Style>
|
||||
</EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||
</EgtWPFLib5:EgtHexList>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPickerTheme_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColorsTheme}"
|
||||
SelectedItem="{Binding SelColorTheme}"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1"
|
||||
Margin="5,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding CustomColor_Msg}"
|
||||
Margin="5,18,5,10"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding CustomColors}"
|
||||
SelectedItem="{Binding SelCustomColor}"
|
||||
HorizontalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,20,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="0,10,5,0"
|
||||
HorizontalAlignment="Left">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Width="100"
|
||||
Height="70"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding CurrColor}"/>
|
||||
<Button x:Name="SaveColor"
|
||||
Grid.Row="1"
|
||||
Margin="0,10,0,0"
|
||||
Content="{Binding AddCColor_Msg}"
|
||||
Command="{Binding SaveColor_Command}"
|
||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Red_Msg}"
|
||||
Margin="0,10,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding Green_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding Blu_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="3"
|
||||
Text="{Binding Hexadecimal_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
Text="{Binding Hexadecimal}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="2"
|
||||
Rows="1"
|
||||
Margin="10,10,10,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,69 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Forms
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtColorPickerV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
Public Property CustomColors As Integer()
|
||||
Get
|
||||
Return m_EgtColorPickerVM.GetCustomColors()
|
||||
End Get
|
||||
Set(value As Integer())
|
||||
m_EgtColorPickerVM.SetCustomColors(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Color As System.Drawing.Color
|
||||
Get
|
||||
Return System.Drawing.Color.FromArgb(255, m_EgtColorPickerVM.Red, m_EgtColorPickerVM.Green, m_EgtColorPickerVM.Blue)
|
||||
End Get
|
||||
Set(value As System.Drawing.Color)
|
||||
m_EgtColorPickerVM.Red = value.R
|
||||
m_EgtColorPickerVM.Green = value.G
|
||||
m_EgtColorPickerVM.Blue = value.B
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
|
||||
MyBase.New(Owner)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EtgColorPickerVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtColorPickerVM = EtgColorPickerVM
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructors
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Apre una finestra EgtColorPicker
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Overloads Function ShowDialog() As DialogResult
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,268 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdEgtColorPickerV"
|
||||
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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Width="750" Height="450"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl>
|
||||
<TabItem Header="{Binding BasicColor_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColors}"
|
||||
SelectedItem="{Binding SelColor}"
|
||||
HorizontalAlignment="Center"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPicker_Msg}">
|
||||
<TabItem.Resources>
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="BorderThickness" Value="1.5"/>
|
||||
<Setter Property="BorderBrush" Value="White"/>
|
||||
</Style>
|
||||
</TabItem.Resources>
|
||||
<EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
|
||||
SelectedItem="{Binding sHexSelColor}"
|
||||
Orientation="Vertical"
|
||||
Margin="2.5"
|
||||
RowCount="13"
|
||||
ColumnCount="13"
|
||||
Height="300"
|
||||
Width="350"
|
||||
Style="{StaticResource EgtHexList}">
|
||||
<EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<DataTemplate/>
|
||||
</EgtWPFLib5:EgtHexList.ItemTemplate>
|
||||
<EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||
<Style TargetType="EgtWPFLib5:EgtHexItem" BasedOn="{StaticResource EgtHexItem}">
|
||||
<Setter Property="Grid.Row" Value="{Binding nRow}"/>
|
||||
<Setter Property="Grid.Column" Value="{Binding nColumn}"/>
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
</Style>
|
||||
</EgtWPFLib5:EgtHexList.ItemContainerStyle>
|
||||
</EgtWPFLib5:EgtHexList>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding ColorPickerTheme_Msg}">
|
||||
<Grid HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding BasicColorsTheme}"
|
||||
SelectedItem="{Binding SelColorTheme}"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1"
|
||||
Margin="5,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding CustomColor_Msg}"
|
||||
Margin="5,18,5,10"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox ItemsSource="{Binding CustomColors}"
|
||||
SelectedItem="{Binding SelCustomColor}"
|
||||
HorizontalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="13"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Rectangle Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding Fill}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,20,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="0,10,5,0"
|
||||
HorizontalAlignment="Left">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Width="100"
|
||||
Height="70"
|
||||
Stroke="Black"
|
||||
StrokeThickness="0.5"
|
||||
Fill="{Binding CurrColor}"/>
|
||||
<Button x:Name="SaveColor"
|
||||
Grid.Row="1"
|
||||
Margin="0,10,0,0"
|
||||
Content="{Binding AddCColor_Msg}"
|
||||
Command="{Binding SaveColor_Command}"
|
||||
Style="{StaticResource LeftPanel_TextButton}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Red_Msg}"
|
||||
Margin="0,10,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding Green_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding Blu_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
<TextBlock Grid.Row="3"
|
||||
Text="{Binding Hexadecimal_Msg}"
|
||||
Margin="5,5,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,5,5,0"
|
||||
Text="{Binding Hexadecimal}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="2"
|
||||
Rows="1"
|
||||
Margin="10,10,10,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,69 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class OnlyProdEgtColorPickerV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtColorPickerVM As EgtColorPickerVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
Public Property CustomColors As Integer()
|
||||
Get
|
||||
Return m_EgtColorPickerVM.GetCustomColors()
|
||||
End Get
|
||||
Set(value As Integer())
|
||||
m_EgtColorPickerVM.SetCustomColors(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Color As System.Drawing.Color
|
||||
Get
|
||||
Return System.Drawing.Color.FromArgb(255, m_EgtColorPickerVM.Red, m_EgtColorPickerVM.Green, m_EgtColorPickerVM.Blue)
|
||||
End Get
|
||||
Set(value As System.Drawing.Color)
|
||||
m_EgtColorPickerVM.Red = value.R
|
||||
m_EgtColorPickerVM.Green = value.G
|
||||
m_EgtColorPickerVM.Blue = value.B
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EtgColorPickerVM As EgtColorPickerVM)
|
||||
MyBase.New(Owner)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EtgColorPickerVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtColorPickerVM = EtgColorPickerVM
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructors
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtColorPickerVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Apre una finestra EgtColorPicker
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Overloads Function ShowDialog() As DialogResult
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -3,16 +3,18 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="HorizontalContentAlignment"
|
||||
Value="Stretch" />
|
||||
<EventSetter Event="SizeChanged"
|
||||
Handler="Cell_SizedChanged" />
|
||||
<EventSetter Event="MouseRightButtonDown"
|
||||
Handler="Cell_MouseRightButtonDown" />
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<EventSetter Event="SizeChanged" Handler="Cell_SizedChanged" />
|
||||
<EventSetter Event="MouseRightButtonDown" Handler="Cell_MouseRightButtonDown" />
|
||||
<!-- Propieta' Header DataGrid -->
|
||||
<Setter Property="Background" Value="{Binding ColumnHeaderBackground, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="Foreground" Value="{Binding ColumnHeaderForeground, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="FontWeight" Value="{Binding ColumnHeaderFontWeight, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="FontSize" Value="{Binding ColumnHeaderFontSize, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding ColumnHeaderHorizontalContentAlignment, ElementName=CurrDataGrid}" />
|
||||
<Setter Property="Padding" Value="{Binding ColumnHeaderPadding, ElementName=CurrDataGrid}" />
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
|
||||
</DataGrid>
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@ Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Controls.Primitives
|
||||
Imports System.Windows.Data
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -364,6 +366,119 @@ Public Class EgtDataGrid
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "COLUMN HEADER PROPERTY DATAGRID"
|
||||
|
||||
#Region "BACKGROUND HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderBackgroundProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderBackground",
|
||||
GetType(Brush),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(SystemColors.ControlBrush))
|
||||
|
||||
Public Property ColumnHeaderBackground As Brush
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderBackgroundProperty), Brush)
|
||||
End Get
|
||||
Set(value As Brush)
|
||||
SetValue(ColumnHeaderBackgroundProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' BackGround Heder
|
||||
|
||||
#Region "FOREGROUND HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderForegroundProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderForeground",
|
||||
GetType(Brush),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(SystemColors.ControlTextBrush))
|
||||
|
||||
Public Property ColumnHeaderForeground As Brush
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderForegroundProperty), Brush)
|
||||
End Get
|
||||
Set(value As Brush)
|
||||
SetValue(ColumnHeaderForegroundProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Foreground Header
|
||||
|
||||
#Region "FONTWEIGHT HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderFontWeightProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderFontWeight",
|
||||
GetType(FontWeight),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(FontWeights.Normal))
|
||||
|
||||
Public Property ColumnHeaderFontWeight As FontWeight
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderFontWeightProperty), FontWeight)
|
||||
End Get
|
||||
Set(value As FontWeight)
|
||||
SetValue(ColumnHeaderFontWeightProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FontWeight Header
|
||||
|
||||
#Region "FONTSIZE HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderFontSizeProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderFontSize",
|
||||
GetType(Double),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(Convert.ToDouble(12)))
|
||||
|
||||
Public Property ColumnHeaderFontSize As Double
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderFontSizeProperty), Double)
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetValue(ColumnHeaderFontSizeProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FontSize Header
|
||||
|
||||
#Region "HORIZONTAKCONTENTALIGNMENT HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderHorizontalContentAlignmentProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderHorizontalContentAlignment",
|
||||
GetType(HorizontalAlignment),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(HorizontalAlignment.Stretch))
|
||||
|
||||
Public Property ColumnHeaderHorizontalContentAlignment As HorizontalAlignment
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderHorizontalContentAlignmentProperty), HorizontalAlignment)
|
||||
End Get
|
||||
Set(value As HorizontalAlignment)
|
||||
SetValue(ColumnHeaderHorizontalContentAlignmentProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' HorizontalContentAlignment Header
|
||||
|
||||
#Region "PADDING HEADER"
|
||||
|
||||
Public Shared ReadOnly ColumnHeaderPaddingProperty As DependencyProperty = DependencyProperty.Register("ColumnHeaderPadding",
|
||||
GetType(Thickness),
|
||||
GetType(EgtDataGrid),
|
||||
New FrameworkPropertyMetadata(New Thickness(0)))
|
||||
|
||||
Public Property ColumnHeaderPadding As Thickness
|
||||
Get
|
||||
Return DirectCast(GetValue(ColumnHeaderPaddingProperty), Thickness)
|
||||
End Get
|
||||
Set(value As Thickness)
|
||||
SetValue(ColumnHeaderPaddingProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Padding Header
|
||||
|
||||
|
||||
#End Region ' Column Header Property DataGrid
|
||||
|
||||
End Class
|
||||
|
||||
Public Class EgtDataGridColumn
|
||||
@@ -407,7 +522,11 @@ Public Class EgtDataGridColumn
|
||||
Private Property m_Width As DataGridLength
|
||||
Public Property Width As DataGridLength
|
||||
Get
|
||||
Return m_dgColumn.Width
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.Width
|
||||
Else
|
||||
Return m_Width
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataGridLength)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
@@ -424,10 +543,14 @@ Public Class EgtDataGridColumn
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property m_DisplayIndex As Integer
|
||||
Private Property m_DisplayIndex As Integer = -1
|
||||
Public Property DisplayIndex As Integer
|
||||
Get
|
||||
Return m_dgColumn.DisplayIndex
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.DisplayIndex
|
||||
Else
|
||||
Return m_DisplayIndex
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
@@ -442,7 +565,11 @@ Public Class EgtDataGridColumn
|
||||
Private Property m_IsReadOnly As Boolean = True
|
||||
Public Property IsReadOnly As Boolean
|
||||
Get
|
||||
Return m_dgColumn.IsReadOnly
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.IsReadOnly
|
||||
Else
|
||||
Return m_IsReadOnly
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
@@ -460,7 +587,11 @@ Public Class EgtDataGridColumn
|
||||
Private m_CanUserReorder As Boolean
|
||||
Public Property CanUserReorder As Boolean
|
||||
Get
|
||||
Return m_dgColumn.CanUserReorder
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.CanUserReorder
|
||||
Else
|
||||
Return m_CanUserReorder
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
@@ -476,7 +607,11 @@ Public Class EgtDataGridColumn
|
||||
Private m_CanUserResize As Boolean
|
||||
Public Property CanUserResize As Boolean
|
||||
Get
|
||||
Return m_dgColumn.CanUserResize
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.CanUserResize
|
||||
Else
|
||||
Return m_CanUserResize
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
@@ -491,7 +626,11 @@ Public Class EgtDataGridColumn
|
||||
Private m_CanUserSort As Boolean
|
||||
Public Property CanUserSort As Boolean
|
||||
Get
|
||||
Return m_dgColumn.CanUserSort
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
Return m_dgColumn.CanUserSort
|
||||
Else
|
||||
Return m_CanUserSort
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Not IsNothing(m_dgColumn) Then
|
||||
@@ -606,6 +745,7 @@ Public Class EgtDataGridColumn
|
||||
|
||||
' funzione per calcolare e scrivere la stringa dei parametri della colonna nell'INI
|
||||
Public Function SaveDataGridColumn() As Boolean
|
||||
If DisplayIndex = -1 Then Return False
|
||||
Dim bOk As Boolean
|
||||
Dim sColumnParams = String.Empty
|
||||
sColumnParams = Name & "," & If(CanUserReorder, 1, 0) & "," & If(CanUserResize, 1, 0) & "," & If(CanUserSort, 1, 0) & "," & If(m_OrigIsReadOnly, 1, 0) & "," & DoubleToString(Width.Value, 6) & "," & Width.UnitType & "," & If(Visible, 1, 0) & "," & If(CanUserEditVisible, 1, 0) & "," & CInt(SortDirection)
|
||||
|
||||
@@ -0,0 +1,400 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="EgtManageFileDialogV"
|
||||
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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Height="500" Width="800"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding GoBack_Command}"
|
||||
Style="{StaticResource RightPanel_Button}">
|
||||
<Image Source="\Resources\EgtDialog\Restore.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<TextBlock Grid.Column="1"
|
||||
Margin="5"
|
||||
Text="{Binding sSelPath}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding ViewModeList}"
|
||||
SelectedItem="{Binding SelViewMode}"
|
||||
Margin="2.5,5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TreeView x:Name="FileTree"
|
||||
ItemsSource="{Binding RootList}"
|
||||
Margin="10"
|
||||
FontSize="15"
|
||||
BorderBrush="White">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}"
|
||||
ItemsSource="{Binding TreeItemList_View}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
</TreeView>
|
||||
<TabControl Grid.Column="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0"
|
||||
SelectedIndex="{Binding nSelTab}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem Header="LISTBOX">
|
||||
<ListBox x:Name="FileList"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
BorderBrush="White"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected, Mode=TwoWay}">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate x:Key="ListTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="TilesTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="50"
|
||||
Width="250">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ContentTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="50">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="2"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sLastModifyDate}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
<Border Grid.Row="1"
|
||||
BorderThickness="1"
|
||||
BorderBrush="LightGray"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<ContentControl Content="{Binding}">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="{x:Type ContentControl}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="0">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="1">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="2">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.Style>
|
||||
<Style TargetType="{x:Type ListBox}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="0">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="1">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="2">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListBox.Style>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="DATAGRID">
|
||||
<DataGrid AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
HeadersVisibility="Column"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected}">
|
||||
<!-- ColumnHeaderStyle="{StaticResource DataGridColumnHeader}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"-->
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="5*">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding sLastModifyDate}"
|
||||
Width="2*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding ghTypeItem}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding sDimension}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Right"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding FileName_Msg}"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Margin="2.5,2.5,2.5,5"
|
||||
TextAlignment="Left"
|
||||
HorizontalAlignment="Stretch"
|
||||
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding FilterList}"
|
||||
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
|
||||
DisplayMemberPath="sNameExstension"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="10,2.5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="3"
|
||||
Rows="1"
|
||||
Margin="2.5,0,2.5,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="15,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,142 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Windows.Input
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtManageFileDialogV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
''' <summary>
|
||||
''' Stringa che specifica il titolo da mostrare
|
||||
''' </summary>
|
||||
Public Overloads Property Title As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sTitle
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sTitle = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Filter As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sFilter
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property InitialDirectory As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sInitialDirectory
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sInitialDirectory = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SafeFileName As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sSaveFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sSaveFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FileName As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FilterIndex As Integer
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.nFilterIndex
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_EgtManageFileDialogVM.nFilterIndex = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Mode As Integer
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.nMode
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_EgtManageFileDialogVM.nMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CheckFileExists As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bCheckFileExists
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bCheckFileExists = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ValidateNames As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bValidateNames
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bValidateNames = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property OverwritePrompt As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bOverwritePrompt
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bOverwritePrompt = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As System.Windows.Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
|
||||
MyBase.New(Owner)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtManageFileDialogVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtManageFileDialogVM = EgtManageFileDialogVM
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As DialogResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overloads Function ShowDialog() As DialogResult
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
Private Sub ListBoxItem_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||
m_EgtManageFileDialogVM.MouseDoubleClick()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,416 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdEgtManageFileDialogV"
|
||||
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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Height="500" Width="800"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding GoBack_Command}"
|
||||
Style="{StaticResource RightPanel_Button}">
|
||||
<Image Source="\Resources\EgtDialog\Restore.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<TextBlock Grid.Column="1"
|
||||
Margin="5"
|
||||
Text="{Binding sSelPath}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding ViewModeList}"
|
||||
SelectedItem="{Binding SelViewMode}"
|
||||
Margin="2.5,5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TreeView x:Name="FileTree"
|
||||
ItemsSource="{Binding RootList}"
|
||||
Margin="10"
|
||||
FontSize="15"
|
||||
BorderBrush="White">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:EgtFolder}"
|
||||
ItemsSource="{Binding TreeItemList_View}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtItem}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
</TreeView>
|
||||
<TabControl Grid.Column="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="White"
|
||||
BorderThickness="0"
|
||||
SelectedIndex="{Binding nSelTab}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem Header="LISTBOX">
|
||||
<ListBox x:Name="FileList"
|
||||
Grid.Row="1"
|
||||
Margin="5,5,5,5"
|
||||
BorderBrush="White"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected, Mode=TwoWay}">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate x:Key="ListTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Height="15"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="TilesTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="50"
|
||||
Width="250">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="3"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ContentTemplateView"
|
||||
DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<Grid Margin="5,5,5,0"
|
||||
Height="50">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding ghTypeItem}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Column="2"
|
||||
Rows="2"
|
||||
Margin="2.5,0,2.5,5">
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sLastModifyDate}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock TextAlignment="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding sDimension}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
<Border Grid.Row="1"
|
||||
BorderThickness="1"
|
||||
BorderBrush="LightGray"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:EgtDirectory}">
|
||||
<ContentControl Content="{Binding}">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="{x:Type ContentControl}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="0">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ListTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="1">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource TilesTemplateView}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}" Value="2">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateView}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.Style>
|
||||
<Style TargetType="{x:Type ListBox}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="0">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="1">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.nSelTempleteListView, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"
|
||||
Value="2">
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListBox.Style>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="DATAGRID">
|
||||
<DataGrid AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
HeadersVisibility="Column"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
SelectionMode="Single"
|
||||
ItemsSource="{Binding SelTreeItem.FolderList, Mode=TwoWay}"
|
||||
SelectedItem="{Binding ItemSelected}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource DataGrid_OnlyProd}">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_Teal}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_DarkGray}"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="5*">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Name_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sName}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="2.5,0,0,0"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding sLastModifyDate}"
|
||||
Width="2*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.LastModify_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding ghTypeItem}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Binding="{Binding sDimension}"
|
||||
Width="1*">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Dimension_Msg, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.ElementStyle>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextAlignment" Value="Right"/>
|
||||
<Setter Property="Padding" Value="12,6,12,6"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.ElementStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DataContext.DoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
</DataGrid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="5,5,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="5,5,5,5"
|
||||
Text="{Binding FileName_Msg}"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Margin="2.5,2.5,2.5,5"
|
||||
TextAlignment="Left"
|
||||
HorizontalAlignment="Stretch"
|
||||
Text="{Binding sSaveFileName, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
|
||||
Style="{StaticResource ParameterList_TextBox}"/>
|
||||
<ComboBox Grid.Column="2"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
ItemsSource="{Binding FilterList}"
|
||||
SelectedItem="{Binding SelFilter, Mode=OneWayToSource}"
|
||||
DisplayMemberPath="sNameExstension"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="10,2.5,2.5,5"
|
||||
Style="{StaticResource RightPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<UniformGrid Grid.Row="3"
|
||||
Rows="1"
|
||||
Margin="2.5,0,2.5,0">
|
||||
<Button IsDefault="True"
|
||||
Content="OK"
|
||||
Command="{Binding Ok_Command}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="15,0,2.5,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="Cancel"
|
||||
Command="{Binding Cancel_Command}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="2.5,0,0,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,142 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Windows.Input
|
||||
|
||||
Public Class OnlyProdEgtManageFileDialogV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtManageFileDialogVM As EgtManageFileDialogVM
|
||||
|
||||
Private Shadows DialogResult As DialogResult
|
||||
|
||||
''' <summary>
|
||||
''' Stringa che specifica il titolo da mostrare
|
||||
''' </summary>
|
||||
Public Overloads Property Title As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sTitle
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sTitle = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Filter As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sFilter
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sFilter = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property InitialDirectory As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sInitialDirectory
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sInitialDirectory = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SafeFileName As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sSaveFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sSaveFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FileName As String
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.sFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_EgtManageFileDialogVM.sFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FilterIndex As Integer
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.nFilterIndex
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_EgtManageFileDialogVM.nFilterIndex = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Mode As Integer
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.nMode
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_EgtManageFileDialogVM.nMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CheckFileExists As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bCheckFileExists
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bCheckFileExists = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ValidateNames As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bValidateNames
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bValidateNames = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property OverwritePrompt As Boolean
|
||||
Get
|
||||
Return m_EgtManageFileDialogVM.bOverwritePrompt
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_EgtManageFileDialogVM.bOverwritePrompt = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As System.Windows.Window, EgtManageFileDialogVM As EgtManageFileDialogVM)
|
||||
MyBase.New(Owner)
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtManageFileDialogVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtManageFileDialogVM = EgtManageFileDialogVM
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As DialogResult) Handles m_EgtManageFileDialogVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overloads Function ShowDialog() As DialogResult
|
||||
MyBase.ShowDialog()
|
||||
Return Me.DialogResult
|
||||
End Function
|
||||
|
||||
Private Sub ListBoxItem_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||
m_EgtManageFileDialogVM.MouseDoubleClick()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,49 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="EgtMessageBoxV"
|
||||
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"
|
||||
Title="{Binding sTitle}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
|
||||
<Grid Margin="2.5,2.5,2.5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="20,20,20,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="0,0,0,0"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sMessage}"
|
||||
Margin="5,0,5,0"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
<ItemsControl Grid.Row="1"
|
||||
ItemsSource="{Binding ButtonList}"
|
||||
HorizontalAlignment="Center">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsDefault="{Binding bIsDefault}"
|
||||
Content="{Binding sMessage}"
|
||||
Command="{Binding Command_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource RightPanel_HalfRound_Button}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,110 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class EgtMessageBoxV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
|
||||
|
||||
Private Shadows DialogResult As MessageBoxResult
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtMessageBoxVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtMessageBoxVM = EgtMessageBoxVM
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||
''' <param name="DefaultResult">Valore che specifica il bottone di default</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
|
||||
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,49 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdEgtMessageBoxV"
|
||||
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"
|
||||
Title="{Binding sTitle}"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
IsMinimizable="False" ShowInTaskbar="False"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<Grid Margin="2.5,2.5,2.5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="20,20,20,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{Binding sIconSource}"
|
||||
Margin="0,0,0,0"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sMessage}"
|
||||
Margin="5,0,5,0"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
</Grid>
|
||||
<ItemsControl Grid.Row="1"
|
||||
ItemsSource="{Binding ButtonList}"
|
||||
HorizontalAlignment="Center">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsDefault="{Binding bIsDefault}"
|
||||
Content="{Binding sMessage}"
|
||||
Command="{Binding Command_Command}"
|
||||
Margin="2.5,0,2.5,0"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,110 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class OnlyProdEgtMessageBoxV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
|
||||
|
||||
Private Shadows DialogResult As MessageBoxResult
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONTRUCTORS"
|
||||
|
||||
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = EgtMessageBoxVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_EgtMessageBoxVM = EgtMessageBoxVM
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
|
||||
Dim NewMessagebox As New OnlyProdEgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
|
||||
Dim NewMessagebox As New OnlyProdEgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
|
||||
Dim NewMessagebox As New OnlyProdEgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
|
||||
Dim NewMessagebox As New OnlyProdEgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
''' <param name="Owner">Finestra di appartenenza</param>
|
||||
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
|
||||
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
|
||||
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
|
||||
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
|
||||
''' <param name="DefaultResult">Valore che specifica il bottone di default</param>
|
||||
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
|
||||
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
|
||||
Dim NewMessagebox As New OnlyProdEgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
|
||||
NewMessagebox.ShowDialog()
|
||||
Return NewMessagebox.DialogResult
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
|
||||
Me.DialogResult = DialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,91 @@
|
||||
<DataGrid x:Class="OnlyProd_QParamListV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserSortColumns="False"
|
||||
CanUserResizeColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
CanUserReorderColumns="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||||
Margin="0,0,0,5"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
Style="{StaticResource DataGrid_OnlyProd}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_Downy}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<!--BWType-->
|
||||
<DataGridTextColumn Binding="{Binding sBWType}"
|
||||
Width="40"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Nome-->
|
||||
<DataGridTextColumn Binding="{Binding sName}"
|
||||
Width="65"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn Binding="{Binding sDescription}"
|
||||
Width="1*"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Default-->
|
||||
<DataGridTextColumn Binding="{Binding sDefault}"
|
||||
Width="65">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Default_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Minimo-->
|
||||
<DataGridTextColumn Binding="{Binding sMin}"
|
||||
Width="70"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Min_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Massimo-->
|
||||
<DataGridTextColumn Binding="{Binding sMax}"
|
||||
Width="70"
|
||||
IsReadOnly="True">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Max_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class OnlyProd_QParamListV
|
||||
|
||||
End Class
|
||||
@@ -11,13 +11,13 @@
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||||
Margin="0,0,0,5">
|
||||
|
||||
<DataGrid.Columns>
|
||||
|
||||
<!--BWType-->
|
||||
<DataGridTextColumn Binding="{Binding sBWType}"
|
||||
Width="40"
|
||||
IsReadOnly="True">
|
||||
Width="40"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Type_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -26,8 +26,9 @@
|
||||
</DataGridTextColumn>
|
||||
<!--Nome-->
|
||||
<DataGridTextColumn Binding="{Binding sName}"
|
||||
Width="50"
|
||||
IsReadOnly="True">
|
||||
Width="50"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -36,8 +37,9 @@
|
||||
</DataGridTextColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn Binding="{Binding sDescription}"
|
||||
Width="1*"
|
||||
IsReadOnly="True">
|
||||
Width="1*"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -46,7 +48,8 @@
|
||||
</DataGridTextColumn>
|
||||
<!--Default-->
|
||||
<DataGridTextColumn Binding="{Binding sDefault}"
|
||||
Width="65">
|
||||
Width="65"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Default_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -55,8 +58,9 @@
|
||||
</DataGridTextColumn>
|
||||
<!--Minimo-->
|
||||
<DataGridTextColumn Binding="{Binding sMin}"
|
||||
Width="65"
|
||||
IsReadOnly="True">
|
||||
Width="65"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Min_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
@@ -65,8 +69,9 @@
|
||||
</DataGridTextColumn>
|
||||
<!--Massimo-->
|
||||
<DataGridTextColumn Binding="{Binding sMax}"
|
||||
Width="65"
|
||||
IsReadOnly="True">
|
||||
Width="65"
|
||||
IsReadOnly="True"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Max_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MachGroupM
|
||||
|
||||
@@ -47,17 +43,19 @@ Public Class MachGroupM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateMachGroup(nId As Integer, sName As String, sMachine As String) As MachGroupM
|
||||
Dim NewMachGroupM As New MachGroupM
|
||||
NewMachGroupM.m_Id = nId
|
||||
NewMachGroupM.m_Name = sName
|
||||
NewMachGroupM.m_Machine = sMachine
|
||||
Dim NewMachGroupM As New MachGroupM With {
|
||||
.m_Id = nId,
|
||||
.m_Name = sName,
|
||||
.m_Machine = sMachine
|
||||
}
|
||||
Return NewMachGroupM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateMachGroup(sName As String, sMachine As String) As MachGroupM
|
||||
Dim NewMachGroupM As New MachGroupM
|
||||
' Creo il nuovo gruppo di lavorazione con i dati ottenuti a seconda del caso in cui mi trovo
|
||||
NewMachGroupM.m_Id = EgtAddMachGroup(sName, sMachine)
|
||||
Dim NewMachGroupM As New MachGroupM With {
|
||||
.m_Id = EgtAddMachGroup(sName, sMachine)
|
||||
}
|
||||
If NewMachGroupM.m_Id = GDB_ID.NULL Then Return Nothing
|
||||
NewMachGroupM.m_Name = sName
|
||||
NewMachGroupM.m_Machine = sMachine
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -85,16 +83,17 @@ Public Class MachGroupPanelM
|
||||
Public Shared Function CreateMachGroupPanel(IsMultiMachGroup As Boolean,
|
||||
MachineList As List(Of Machine), DefaultMachine As String,
|
||||
Optional sBaseName As String = "MachGroup_1") As MachGroupPanelM
|
||||
Dim NewMachGroupPanelM As New MachGroupPanelM
|
||||
NewMachGroupPanelM.m_IsMultiMachGroup = IsMultiMachGroup
|
||||
' Assegno nome base
|
||||
NewMachGroupPanelM.m_BaseName = sBaseName
|
||||
' Recupero lista macchine
|
||||
NewMachGroupPanelM.m_MachineList = MachineList
|
||||
' Assegno macchina di default
|
||||
NewMachGroupPanelM.m_DefaultMachine = DefaultMachine
|
||||
' recupero i MachGroup
|
||||
NewMachGroupPanelM.m_MachGroupMList = LoadMachGroups()
|
||||
Dim NewMachGroupPanelM As New MachGroupPanelM With {
|
||||
.m_IsMultiMachGroup = IsMultiMachGroup,
|
||||
.m_BaseName = sBaseName,
|
||||
.m_MachineList = MachineList,
|
||||
.m_DefaultMachine = DefaultMachine,
|
||||
.m_MachGroupMList = LoadMachGroups()
|
||||
}
|
||||
|
||||
Return NewMachGroupPanelM
|
||||
End Function
|
||||
@@ -140,34 +139,6 @@ Public Class MachGroupPanelM
|
||||
Return New List(Of MachGroupM)(m_MachGroupMList)
|
||||
End Function
|
||||
|
||||
'Public Function InitMachGroupPanel(IsMultiMachGroup As Boolean,
|
||||
' MachineList As List(Of Machine), DefaultMachine As String,
|
||||
' Optional sBaseName As String = "MachGroup_1") As Boolean
|
||||
' m_IsMultiMachGroup = IsMultiMachGroup
|
||||
' ' se è a gruppo singolo, nascondo il panel
|
||||
' If Not m_IsMultiMachGroup Then SetMachGroupPanelVisibility(False)
|
||||
' ' Assegno nome base
|
||||
' m_BaseName = sBaseName
|
||||
' ' Recupero lista macchine
|
||||
' m_MachineList = MachineList
|
||||
' ' Assegno macchina di default
|
||||
' m_DefaultMachine = DefaultMachine
|
||||
' Return MachineList.Count > 0
|
||||
'End Function
|
||||
|
||||
'Public Overridable Sub LoadMachGroupList()
|
||||
' ' Carico i gruppi di lavorazione nella lista
|
||||
' Dim nId = EgtGetFirstMachGroup()
|
||||
' While nId <> GDB_ID.NULL
|
||||
' Dim sName As String = String.Empty
|
||||
' Dim sMachine As String = String.Empty
|
||||
' EgtGetMachGroupName(nId, sName)
|
||||
' EgtGetMachGroupMachineName(nId, sMachine)
|
||||
' MachGroupMList.Add(New MachGroup(nId, sName, sMachine))
|
||||
' nId = EgtGetNextMachGroup(nId)
|
||||
' End While
|
||||
'End Sub
|
||||
|
||||
Public Overridable Function NewMachGroup() As MachGroupM
|
||||
' Sistemazioni preliminari
|
||||
OnPreNewMachGroup()
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachGroupVM
|
||||
Inherits VMBase
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -213,9 +211,11 @@ Public Class NewMachGroupPanelVM
|
||||
Public Overridable Sub RemoveMachGroup()
|
||||
' Calcolo indice del gruppo da cancellare
|
||||
Dim nSelectedMachGroupIndex As Integer = MachGroupVMList.IndexOf(SelectedMachGroup)
|
||||
Dim m_MessageBoxResult As MessageBoxResult
|
||||
If MachGroupVMList.Count = 1 Then
|
||||
'chiedo conferma prima di resettare il gruppo di lavorazione
|
||||
Select Case MessageBox.Show("Eliminare?", "", MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
Select Case m_MessageBoxResult
|
||||
Case MessageBoxResult.Yes
|
||||
' cancello il gruppo corrente e ne creo uno nuovo con lo stesso nome
|
||||
m_MachGroupPanelM.OnPreRemoveCurrMachGroup()
|
||||
@@ -228,7 +228,8 @@ Public Class NewMachGroupPanelVM
|
||||
End Select
|
||||
Else
|
||||
'chiedo conferma prima di cancellare il gruppo di lavorazione
|
||||
Select Case MessageBox.Show("Eliminare?", "", MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
MessageBox.Show(Application.Current.MainWindow, EgtMsg(62539), "", MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
Select Case m_MessageBoxResult
|
||||
Case MessageBoxResult.Yes
|
||||
' cancello quello selezionato (ovvero il corrente)
|
||||
m_MachGroupPanelM.OnPreRemoveCurrMachGroup()
|
||||
@@ -280,7 +281,6 @@ Public Class NewMachGroupPanelVM
|
||||
|
||||
Protected Overridable Sub OnMachGroupVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||
Select Case e.PropertyName
|
||||
'Case nameof(sender.sMATERIAL)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -59,7 +59,12 @@ Public Module LoadingWndHelper
|
||||
m_thread = New Thread(Sub()
|
||||
m_LoadingWndVM = New Core.LoadingWndVM(nSteps, TotText, AddressOf LoadingCallback)
|
||||
m_LoadingWndVM.UpdateProgress(m_CurrStep, m_StepText, m_nProgress, m_nNextProgress)
|
||||
Dim LoadingWnd As New LoadingWndV(Nothing, m_LoadingWndVM)
|
||||
Dim LoadingWnd As Object
|
||||
If bOnlyProd Then
|
||||
LoadingWnd = New OnlyProdLoadingWndV(Nothing, m_LoadingWndVM)
|
||||
Else
|
||||
LoadingWnd = New LoadingWndV(Nothing, m_LoadingWndVM)
|
||||
End If
|
||||
' posiziono la finestra
|
||||
If WindowStartupLocation = Windows.WindowStartupLocation.CenterScreen Then
|
||||
LoadingWnd.WindowStartupLocation = Windows.WindowStartupLocation.CenterScreen
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
Imports System.Timers
|
||||
Imports System.Windows
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class LoadingWndVM
|
||||
@@ -218,12 +215,6 @@ Public Class LoadingWndVM
|
||||
''' Execute the Open. This method is invoked by the OpenCommand.
|
||||
''' </summary>
|
||||
Friend Sub Cancel()
|
||||
'' chiedo conferma
|
||||
'If MessageBox.Show("Are you sure you want to stop the nesting?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) = MessageBoxResult.No Then Return
|
||||
'' fermo il nesting
|
||||
'Map.refOptimizePanelVM.m_StopNesting = True
|
||||
'' fermo timer e chiudo finestra
|
||||
'CloseNesting()
|
||||
End Sub
|
||||
|
||||
#End Region ' Cancel
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdLoadingWndV"
|
||||
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"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}"
|
||||
Height="200" Width="300"
|
||||
TitleBarHeight="0"
|
||||
ResizeMode="NoResize" WindowStyle="None"
|
||||
IsClosable="False" IsMinimizable="False"
|
||||
WindowStartupLocation="Manual" ShowInTaskbar="False">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding TotText_Msg}"
|
||||
TextAlignment="Center"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding StepText_Msg}"
|
||||
TextAlignment="Center"
|
||||
Visibility="{Binding StepText_Visibility}"/>
|
||||
<Grid Grid.Row="3"
|
||||
Visibility="{Binding StepProgress_Visibility}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Height="20"/>
|
||||
<ProgressBar Grid.Row="1"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="{Binding StepProgress_Value}"
|
||||
Height="20"
|
||||
Margin="40,0,40,0"/>
|
||||
</Grid>
|
||||
<ProgressBar Grid.Row="5"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="{Binding TotProgress_Value}"
|
||||
Height="20"
|
||||
Margin="40,0,40,0"/>
|
||||
<TextBlock Grid.Row="7"
|
||||
Text="{Binding TotProgress_Msg}"
|
||||
TextAlignment="Center"/>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,36 @@
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows
|
||||
|
||||
Public Class OnlyProdLoadingWndV
|
||||
|
||||
Private WithEvents m_LoadingWndVM As LoadingWndVM
|
||||
|
||||
Sub New(Owner As Window, LoadingWndVM As LoadingWndVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = LoadingWndVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_LoadingWndVM = LoadingWndVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_LoadingWndVM.m_CloseWindow
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub ActivateWindow() Handles m_LoadingWndVM.m_ActivateWindow
|
||||
Me.Activate()
|
||||
End Sub
|
||||
|
||||
Private Sub Me_ContentRendered() Handles Me.ContentRendered
|
||||
m_LoadingWndVM.StartFunction()
|
||||
End Sub
|
||||
|
||||
Private Sub ToolsDbView_Closing(sender As Object, e As ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyMachGroupM
|
||||
@@ -301,11 +297,12 @@ Public Class MyMachGroupM
|
||||
End Function
|
||||
|
||||
Public Overloads Shared Function CreateMyMachGroup(Type As BWType, nId As Integer, sName As String, sMachine As String) As MachGroupM
|
||||
Dim NewMachGroupM As New MyMachGroupM
|
||||
NewMachGroupM.m_Id = nId
|
||||
NewMachGroupM.m_Name = sName
|
||||
NewMachGroupM.m_Machine = sMachine
|
||||
NewMachGroupM.m_nType = Type
|
||||
Dim NewMachGroupM As New MyMachGroupM With {
|
||||
.m_Id = nId,
|
||||
.m_Name = sName,
|
||||
.m_Machine = sMachine,
|
||||
.m_nType = Type
|
||||
}
|
||||
If NewMachGroupM.m_nType = MachineType.BEAM Then
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_BARLEN, NewMachGroupM.m_dL)
|
||||
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_BARHEIGHT, NewMachGroupM.m_dH)
|
||||
@@ -333,8 +330,9 @@ Public Class MyMachGroupM
|
||||
End Function
|
||||
|
||||
Public Overloads Shared Function CreateMyMachGroup(Type As BWType, sName As String, sMachine As String) As MachGroupM
|
||||
Dim NewMachGroupM As New MyMachGroupM
|
||||
NewMachGroupM.m_Id = EgtAddMachGroup(sName, sMachine)
|
||||
Dim NewMachGroupM As New MyMachGroupM With {
|
||||
.m_Id = EgtAddMachGroup(sName, sMachine)
|
||||
}
|
||||
If NewMachGroupM.m_Id = GDB_ID.NULL Then Return Nothing
|
||||
NewMachGroupM.m_Name = sName
|
||||
NewMachGroupM.m_Machine = sMachine
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MyMachGroupPanelM
|
||||
@@ -13,14 +11,15 @@ Public Class MyMachGroupPanelM
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Public Shared Function CreateMyMachGroupPanel(MachineList As List(Of Machine)) As MachGroupPanelM
|
||||
Dim NewMyMachGroupPanelM As New MyMachGroupPanelM
|
||||
NewMyMachGroupPanelM.m_IsMultiMachGroup = False
|
||||
' Assegno nome base
|
||||
NewMyMachGroupPanelM.m_BaseName = ""
|
||||
' Recupero lista macchine
|
||||
NewMyMachGroupPanelM.m_MachineList = MachineList
|
||||
' Assegno macchina di default
|
||||
NewMyMachGroupPanelM.m_DefaultMachine = ""
|
||||
Dim NewMyMachGroupPanelM As New MyMachGroupPanelM With {
|
||||
.m_IsMultiMachGroup = False,
|
||||
.m_BaseName = "",
|
||||
.m_MachineList = MachineList,
|
||||
.m_DefaultMachine = ""
|
||||
}
|
||||
' aggiorno copie
|
||||
UpdateAllDuplo()
|
||||
' recupero i MachGroup
|
||||
@@ -130,7 +129,6 @@ Public Class MyMachGroupPanelM
|
||||
End Function
|
||||
|
||||
Public Overrides Function OnPreNewMachGroup() As Boolean
|
||||
'EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -141,17 +139,6 @@ Public Class MyMachGroupPanelM
|
||||
Dim sCurrMachName As String = String.Empty
|
||||
EgtGetCurrMachineName(sCurrMachName)
|
||||
WriteMainPrivateProfileString(S_MACH, K_CURRMACH, sCurrMachName)
|
||||
'' leggo nome attrezzaggio di default
|
||||
'Dim sDefaultSetUpName As String = String.Empty
|
||||
'Dim sMachineIniPath As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachName & "\" & sCurrMachName & ".ini"
|
||||
'EgtUILib.GetPrivateProfileString(S_SETUP, K_DEFAULT, "", sDefaultSetUpName, sMachineIniPath)
|
||||
'' se è attiva l'opzione, rendo corrente l'attrezzaggio di default
|
||||
'If Not String.IsNullOrEmpty(sDefaultSetUpName) Then
|
||||
' If Not EgtImportSetup(sDefaultSetUpName) Then
|
||||
' EgtOutLog("Error loading default setup " & sDefaultSetUpName)
|
||||
' MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 9) & " " & sDefaultSetUpName, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
' End If
|
||||
'End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -205,7 +192,13 @@ Public Class MyMachGroupPanelM
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
If EgtExistsInfo(nOutlineId, MGR_FTR_PRC) Then
|
||||
If EgtExistsInfo(nOutlineId, MGR_FTR_PRID) Then
|
||||
Dim nCurrPrId As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRID, nCurrPrId) AndAlso nCurrPrId <> GDB_ID.NULL Then
|
||||
If nCurrPrId < nPRId Then
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
|
||||
nPRId += 1
|
||||
End If
|
||||
nPRId = Math.Max(nPRId - 1, nCurrPrId) + 1
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
Continue While
|
||||
Else
|
||||
@@ -244,7 +237,14 @@ Public Class MyMachGroupPanelM
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
If Not EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
|
||||
If nPRId < nGlobPRId Then
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
|
||||
nPRId = nGlobPRId
|
||||
nGlobPRId += 1
|
||||
End If
|
||||
nGlobPRId = Math.Max(nGlobPRId - 1, nPRId) + 1
|
||||
Else
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
|
||||
nPRId = nGlobPRId
|
||||
nGlobPRId += 1
|
||||
@@ -402,20 +402,6 @@ Public Class MyMachGroupPanelM
|
||||
End If
|
||||
End While
|
||||
ToRedrawMachGroupList.Add(nMachGroupId)
|
||||
|
||||
|
||||
|
||||
'' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
'Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
'While nRawId <> GDB_ID.NULL
|
||||
' EgtRemovePartFromRawPart(EgtGetFirstPartInRawPart(nRawId))
|
||||
' EgtRemoveRawPart(nRawId)
|
||||
' nRawId = EgtGetFirstRawPart()
|
||||
'End While
|
||||
'If Not ExecBeam(Map.refMainWindowVM.MainWindowM.sTempDir, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then Return False
|
||||
|
||||
|
||||
|
||||
' lo setto come corrente
|
||||
EgtSetCurrMachGroup(nMachGroupId)
|
||||
' elimino pezzo copia
|
||||
@@ -466,15 +452,6 @@ Public Class MyMachGroupPanelM
|
||||
Return EgtGetParent(nSwapItem)
|
||||
End If
|
||||
Return GDB_ID.NULL
|
||||
|
||||
|
||||
|
||||
'Dim nRawId As Integer = GDB_ID.NULL
|
||||
'If EgtGetInfo(nDuploId, GDB_SI_LIST, nRawId) AndAlso nRawId > 0 Then
|
||||
' Return nRawId
|
||||
'Else
|
||||
' Return GDB_ID.NULL
|
||||
'End If
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class PartM
|
||||
@@ -299,7 +295,6 @@ Public Class PartM
|
||||
Else
|
||||
Return m_dPOSY
|
||||
End If
|
||||
'Return m_dPOSY
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dPOSY = value
|
||||
@@ -468,9 +463,10 @@ Public Class PartM
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreatePart(Type As BWType, nParentMachGroup As MyMachGroupM, nPartId As Integer, nRawPartId As Integer) As PartM
|
||||
Dim NewPartM As New PartM(nParentMachGroup, nPartId)
|
||||
NewPartM.m_nType = Type
|
||||
NewPartM.m_nRawPartId = nRawPartId
|
||||
Dim NewPartM As New PartM(nParentMachGroup, nPartId) With {
|
||||
.m_nType = Type,
|
||||
.m_nRawPartId = nRawPartId
|
||||
}
|
||||
' leggo info pezzo
|
||||
EgtGetInfo(nPartId, BTL_PRT_PROJ, NewPartM.m_nProjId)
|
||||
EgtGetInfo(nPartId, BTL_PRT_PDN, NewPartM.m_nPDN)
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -118,17 +115,9 @@ Public MustInherit Class MyMachGroupPanelVM
|
||||
EgtRemoveRawPart(nRawId)
|
||||
nRawId = EgtGetFirstRawPart()
|
||||
End While
|
||||
'If Not ExecBeam(Map.refMainWindowVM.MainWindowM.sTempDir, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then Return False
|
||||
|
||||
Next
|
||||
End Sub
|
||||
|
||||
'Public Overrides Sub AddMachGroup()
|
||||
' Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(CurrentMachine.sMachineName, Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||
' ' e lo seleziono
|
||||
' SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
||||
'End Sub
|
||||
|
||||
Public Overrides Function OnPreSetCurrMachGroup() As Boolean
|
||||
EgtSetCurrentContext(CoreMap.refSceneHostVM.MainScene.GetCtx())
|
||||
Return True
|
||||
@@ -145,18 +134,6 @@ Public MustInherit Class MyMachGroupPanelVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' funzione che seleziona primo gruppo
|
||||
'Friend Sub SelFirstMachGroup()
|
||||
' If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||
' SelectedMachGroup = MachGroupVMList(0)
|
||||
' Else
|
||||
' SelectedMachGroup = Nothing
|
||||
' EgtResetCurrMachGroup()
|
||||
' ' nascondo tutti i pezzi
|
||||
' Map.refProjectVM.BTLStructureVM.HideAll()
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
' funzione che seleziona ultimo gruppo
|
||||
Public Sub SelLastMachGroup()
|
||||
If Not IsNothing(Me) AndAlso Not IsNothing(MachGroupVMList) AndAlso MachGroupVMList.Count > 0 Then
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.Specialized
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -438,8 +436,6 @@ Public MustInherit Class MyMachGroupVM
|
||||
m_SupervisorId = SupervisorId
|
||||
End Sub
|
||||
|
||||
Private m_cc As StateChangeEventArgs
|
||||
|
||||
Public ReadOnly Property IsReadOnly As Boolean
|
||||
Get
|
||||
Return String.IsNullOrEmpty(m_SupervisorId)
|
||||
@@ -476,10 +472,6 @@ Public MustInherit Class MyMachGroupVM
|
||||
|
||||
Public MustOverride Sub RefreshGroupData()
|
||||
|
||||
Public Overridable Function Copy() As MyMachGroupVM
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Public Sub UpdateUsage()
|
||||
If nType = BWType.BEAM Then
|
||||
MyMachGroupM.SetMatForPart(0)
|
||||
|
||||
@@ -6,8 +6,6 @@ Imports System.Windows.Input
|
||||
Imports System.Windows.Media
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.Windows.Threading
|
||||
|
||||
Public MustInherit Class PartVM
|
||||
Inherits VMBase
|
||||
@@ -575,7 +573,13 @@ Public MustInherit Class PartVM
|
||||
Public Sub CalcGlobalUpdate()
|
||||
m_PartM.nCALC_GlobalState = nCALC_State
|
||||
For Each Feature In FeatureVMList
|
||||
If Not Feature.bDO Then Continue For
|
||||
If Not Feature.bDO Then
|
||||
If Feature.nState = CalcStates.COLLISION AndAlso Feature.nState > m_PartM.nCALC_GlobalState Then
|
||||
m_PartM.nCALC_GlobalState = Feature.nState
|
||||
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
||||
End If
|
||||
Continue For
|
||||
End If
|
||||
If Feature.nState > m_PartM.nCALC_GlobalState Then
|
||||
m_PartM.nCALC_GlobalState = Feature.nState
|
||||
m_PartM.nCALC_GlobalERR = Feature.nCALC_ERR
|
||||
@@ -638,9 +642,6 @@ Public MustInherit Class PartVM
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub OnBTLFeatureVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
|
||||
'Select Case e.PropertyName
|
||||
' Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
|
||||
'End Select
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
@@ -24,18 +24,18 @@
|
||||
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Content="{Binding ToolDBMsg}"/>
|
||||
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Content="{Binding MachiningDbMsg}"/>
|
||||
Style="{StaticResource ToolBar_TextButton}" Margin="5,0,0,0" Content="{Binding MachiningDbMsg}"/>
|
||||
<Button Command="{Binding SetUpCommand}" ToolTip="{Binding SetUpToolTip}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Content="{Binding SetUpMsg}"
|
||||
Style="{StaticResource ToolBar_TextButton}" Margin="5,0,0,0" Content="{Binding SetUpMsg}"
|
||||
Visibility="{Binding SetUp_Visibility}"/>
|
||||
<Button ToolTip="{Binding BeamTable_ToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Style="{StaticResource ToolBar_Button}" Margin="5,0,0,0"
|
||||
Command="{Binding BeamTable_Command}"
|
||||
Visibility="{Binding BeamTable_Visibility}">
|
||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding WallTable_ToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Style="{StaticResource ToolBar_Button}" Margin="5,0,0,0"
|
||||
Command="{Binding WallTable_Command}"
|
||||
Visibility="{Binding WallTable_Visibility}">
|
||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
||||
@@ -43,7 +43,7 @@
|
||||
<Button Content="{Binding ParameterMachineMsg}"
|
||||
ToolTip="{Binding ParameterMachineMsg}"
|
||||
Command="{Binding ParameterMachine_Command}"
|
||||
Style="{StaticResource ToolBar_ParameterMachineButton}"/>
|
||||
Height="30" Width="120" Margin="5,0,0,0" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<Grid x:Class="OnlyProdMachinePanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
IsEnabled="{Binding MachPanel_IsEnabled}">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Margin="0,0,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Macchina corrente"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,5,0"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<!--Combobox per selezionare la macchina corrente-->
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
|
||||
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
</Grid>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Content="{Binding ToolDBMsg}"
|
||||
ToolTip="{Binding ToolDBToolTip}"
|
||||
Command="{Binding ToolDbCommand}"
|
||||
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
|
||||
<Button Content="{Binding MachiningDbMsg}"
|
||||
Command="{Binding MachDbCommand}"
|
||||
ToolTip="{Binding MachiningDbToolTip}"
|
||||
Style="{StaticResource GeneralConfigurationToolBar_TextButton}" Width="100"/>
|
||||
<Button Content="{Binding SetUpMsg}"
|
||||
Command="{Binding SetUpCommand}"
|
||||
ToolTip="{Binding SetUpToolTip}"
|
||||
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"
|
||||
Visibility="{Binding SetUp_Visibility}"/>
|
||||
<Button ToolTip="{Binding BeamTable_ToolTip}"
|
||||
Command="{Binding BeamTable_Command}"
|
||||
Visibility="{Binding BeamTable_Visibility}"
|
||||
Style="{StaticResource ToolBarWarehouse_Button}">
|
||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding WallTable_ToolTip}"
|
||||
Command="{Binding WallTable_Command}"
|
||||
Visibility="{Binding WallTable_Visibility}"
|
||||
Style="{StaticResource ToolBarWarehouse_Button}">
|
||||
<Image Source="/Resources/Configuration/MachiningsTable.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Content="{Binding ParameterMachineMsg}"
|
||||
ToolTip="{Binding ParameterMachineMsg}"
|
||||
Command="{Binding ParameterMachine_Command}"
|
||||
Style="{StaticResource MachineToolBar_ParameterMachineButton}" Width="140"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class OnlyProdMachinePanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,128 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdMachiningDbWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding Title}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseMachiningsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding ReloadMachiningCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:DepthUnitConverter x:Key="DepthUnitConverter"/>
|
||||
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.75*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<UniformGrid Grid.Row="0" Columns="3">
|
||||
<Button Content="{Binding NewMsg}" Command="{Binding NewCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding SaveMsg}" Command="{Binding SaveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding RemoveMsg}" Command="{Binding RemoveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TreeView Name="MachiningsTreeView" Grid.Row="1"
|
||||
ItemsSource="{Binding Path=MachiningsList}">
|
||||
<TreeView.Style>
|
||||
<Style TargetType="{x:Type TreeView}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</TreeView.Style>
|
||||
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyMachiningTreeViewItem}" ItemsSource="{Binding Items}">
|
||||
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:MachiningTreeViewItem}">
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding NamePar}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
|
||||
</TreeView>
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Content="{Binding ImportMsg}" Command="{Binding ImportCommand}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding ExportMsg}" Command="{Binding ExportCommand}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding ResetMsg}" Command="{Binding ReloadMachiningCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=MachiningsTreeView}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,30 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows.Input
|
||||
|
||||
Public Class OnlyProdMachiningDbWindowV
|
||||
|
||||
Private WithEvents m_MachiningDbWindowVM As MachiningDbWindowVM
|
||||
|
||||
Sub New(Owner As System.Windows.Window, MachiningDbWindowVM As MachiningDbWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = MachiningDbWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_MachiningDbWindowVM = MachiningDbWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MachiningDbWindowVM.m_CloseWindow
|
||||
Me.DataContext = Nothing
|
||||
Me.DialogResult = bDialogResult
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub MachiningDb_Closing(sender As Object, e As ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -16,7 +16,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtBEAMWALL.Core")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyVersion("2.7.1.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.1.1")>
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
Margin="5"
|
||||
RowDetailsVisibilityMode="Visible"
|
||||
CellEditEnding="MainDataGrid_CellEditEnding"
|
||||
ColumnHeaderBackground="{x:Null}"
|
||||
BindingColumns="{Binding ProdColumns}">
|
||||
<DataGrid.Resources>
|
||||
<!-- ProdId -->
|
||||
@@ -126,7 +127,7 @@
|
||||
<ToggleButton Grid.Column="1"
|
||||
Margin="5,0,0,0"
|
||||
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource ToolBar_SmallToggleButton}">
|
||||
Style="{StaticResource OldToolBar_SmallToggleButton}">
|
||||
<Image Source="\Resources\CalcPanel\Edit.png"
|
||||
Style="{StaticResource LockImage}"/>
|
||||
</ToggleButton>
|
||||
|
||||
@@ -4,8 +4,6 @@ Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Data
|
||||
Imports System.Windows.Input
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -590,22 +588,6 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Sub
|
||||
|
||||
Protected Sub LoadColumns()
|
||||
'If ProjectType = ProjectType.PROJ Then
|
||||
' carico le colonne della datagrid
|
||||
' GetPrivateProfileColumns(S_OPENPROJFILEDLG_PROJ, ProjColumns)
|
||||
' ' carico campi su cui eseguire il filtro di ricerca
|
||||
' m_BTLDateTypeList = New List(Of String)({CreateDate_Msg, ExportDate_Msg})
|
||||
' m_SelBTLDateType = BTLDateTypes.CREATEDATE
|
||||
' NotifyPropertyChanged(NameOf(BTLDateTypeList))
|
||||
' NotifyPropertyChanged(NameOf(SelBTLDateType))
|
||||
' m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""),
|
||||
' New IdNameStruct(FilterTypes.ID, Id_Msg),
|
||||
' New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
|
||||
' New IdNameStruct(FilterTypes.LISTNAME, ListName_Msg),
|
||||
' New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
|
||||
' m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
|
||||
' NotifyPropertyChanged(NameOf(SelFilterType))
|
||||
'ElseIf ProjectType = ProjectType.PROD Then
|
||||
' carico le colonne della datagrid
|
||||
GetPrivateProfileColumns(S_NEWOPENPROJFILEDLG_PROD, ProdColumns)
|
||||
' carico campi su cui eseguire il filtro di ricerca
|
||||
@@ -661,15 +643,6 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'ElseIf TypeOf Proj Is ProdFileVM Then
|
||||
' Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
|
||||
' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
' (m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
' (m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'End If
|
||||
Return bProjectOk
|
||||
End Function
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
IsClosable="False"
|
||||
@@ -23,8 +23,8 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Header="{Binding Filters_Msg}"
|
||||
Margin="5"
|
||||
Visibility="{Binding Filters_Visibility}">
|
||||
Visibility="{Binding Filters_Visibility}"
|
||||
Margin="5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -38,24 +38,26 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox ItemsSource="{Binding BTLDateTypeList}"
|
||||
SelectedIndex="{Binding SelBTLDateType}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
Style="{StaticResource BTLDateTypeList_ComboBox}"/>
|
||||
<StackPanel Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<ComboBox ItemsSource="{Binding DayTypeList}"
|
||||
SelectedIndex="{Binding SelDayType}"
|
||||
Width="105"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource PartParam_ComboBox}"/>
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding Date_Visibility}">
|
||||
Style="{StaticResource DayTypeList_ComboBox}"/>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Visibility="{Binding Date_Visibility}">
|
||||
<TextBlock Text="{Binding From_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
Style="{StaticResource Filter_TextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<DatePicker SelectedDate="{Binding dtStartDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
Style="{StaticResource Filter_DatePicker}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"/>
|
||||
<TextBlock Text="{Binding To_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
Style="{StaticResource Filter_TextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<DatePicker SelectedDate="{Binding dtEndDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
Style="{StaticResource Filter_DatePicker}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<CheckBox Grid.Column="2"
|
||||
@@ -73,38 +75,45 @@
|
||||
SelectedItem="{Binding SelFilterType}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SearchText}"
|
||||
Margin="5"
|
||||
Visibility="{Binding SearchText_Visibility}"/>
|
||||
Visibility="{Binding SearchText_Visibility}"
|
||||
Style="{StaticResource NewSearchText_TextBox}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Rows_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
Style="{StaticResource OptionTextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
SelectedIndex="{Binding SelRowQuantity}"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
Style="{StaticResource OnyProd_FeatureComboBox}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid x:Name="MainDataGrid"
|
||||
Grid.Row="1"
|
||||
<Border Grid.Row="1" Style="{StaticResource OnlyProdPage_Border}" Margin="1"/>
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
||||
x:Name="MainDataGrid"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="5"
|
||||
BindingColumns="{Binding ProdColumns}"
|
||||
RowDetailsVisibilityMode="Visible"
|
||||
CellEditEnding="MainDataGrid_CellEditEnding"
|
||||
BindingColumns="{Binding ProdColumns}">
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderBackground="{StaticResource BeamWall_Teal}"
|
||||
ColumnHeaderForeground="{StaticResource BeamWall_White}"
|
||||
ColumnHeaderHorizontalContentAlignment="Center"
|
||||
ColumnHeaderFontWeight="Bold"
|
||||
ColumnHeaderFontSize="15"
|
||||
ColumnHeaderPadding="0,2,0,2"
|
||||
Style="{StaticResource DataGrid_OnlyProd}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<DataGrid.Resources>
|
||||
<!-- ProdId -->
|
||||
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
|
||||
@@ -124,7 +133,6 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"/>
|
||||
<ToggleButton Grid.Column="1"
|
||||
Margin="5,0,0,0"
|
||||
IsChecked="{Binding Path=DataContext.bIsEditNameActive,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"
|
||||
Style="{StaticResource ToolBar_SmallToggleButton}">
|
||||
<Image Source="\Resources\CalcPanel\Edit.png"
|
||||
@@ -151,9 +159,7 @@
|
||||
<DataTemplate>
|
||||
<Image Source="\Resources\OpenProjectFileDialog\Archived.png"
|
||||
Visibility="{Binding Archived_Visibility}"
|
||||
Height="15"
|
||||
Width="15"
|
||||
Stretch="UniformToFill"/>
|
||||
Style="{StaticResource Archived_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.Header>
|
||||
@@ -162,7 +168,7 @@
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="FontWeight" Value="DemiBold"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ProjectList_MouseDoubleClick"/>
|
||||
@@ -171,13 +177,10 @@
|
||||
<DataGrid.RowDetailsTemplate>
|
||||
<DataTemplate>
|
||||
<ItemsControl ItemsSource="{Binding ProjFileList}"
|
||||
BorderThickness="0"
|
||||
Margin="0,-1,0,0"
|
||||
Padding="0">
|
||||
Style="{StaticResource ProjFileList_ItemsControl}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid TextBlock.FontSize="12"
|
||||
TextBlock.FontWeight="Normal">
|
||||
<Grid Style="{StaticResource ProjFileList_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{Binding Path=DataContext.ProdColumns[0].ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdNewOpenProjectFileDialogV}}}"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -188,8 +191,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Background="Gray"
|
||||
Margin="40,0,40,0"/>
|
||||
Style="{StaticResource Gray_Grid}"/>
|
||||
<Grid Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Margin="2">
|
||||
@@ -227,21 +229,22 @@
|
||||
</DataGrid.RowDetailsTemplate>
|
||||
</EgtBEAMWALL:EgtDataGrid>
|
||||
|
||||
<UniformGrid Columns="4" Grid.Row="2" Margin="0,0,0,5">
|
||||
<UniformGrid Columns="4" Grid.Row="2"
|
||||
Margin="0,0,0,5">
|
||||
<Button IsDefault="True" Name="OpenBtn"
|
||||
Content="{Binding Open_Msg}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Archive_Msg}"
|
||||
Command="{Binding Archive_Command}"
|
||||
IsEnabled="{Binding bArchived_IsEnabled}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Delete_Msg}"
|
||||
Command="{Binding Delete_Command}"
|
||||
IsEnabled="{Binding bDelete_IsEnabled}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Command="{Binding Cancel_Command}"
|
||||
Content="{Binding Cancel_Msg}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -77,4 +77,17 @@ Public Class OnlyProdNewOpenProjectFileDialogV
|
||||
'm_OpenProjFileDialogVM.SetIsEditNameActive(False)
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly IsSelectedProperty As DependencyProperty = DependencyProperty.Register("IsSelected",
|
||||
GetType(Boolean),
|
||||
GetType(ItemsControl))
|
||||
|
||||
Public Property IsSelected As Boolean
|
||||
Get
|
||||
Return DirectCast(GetValue(IsSelectedProperty), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetValue(IsSelectedProperty, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Core"
|
||||
Title="{Binding Title}"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="True"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
MinHeight="500" MinWidth="500"
|
||||
@@ -23,7 +23,8 @@
|
||||
|
||||
<GroupBox Header="Filters"
|
||||
Margin="5"
|
||||
Visibility="{Binding Filters_Visibility}">
|
||||
Visibility="{Binding Filters_Visibility}"
|
||||
BorderBrush="{StaticResource BeamWall_RegentStBlue}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -38,22 +39,26 @@
|
||||
SelectedIndex="{Binding SelBTLDateType}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<ComboBox ItemsSource="{Binding DayTypeList}"
|
||||
SelectedIndex="{Binding SelDayType}"
|
||||
Width="105"
|
||||
Margin="0,0,2.5,0"
|
||||
Style="{StaticResource PartParam_ComboBox}"/>
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding Date_Visibility}">
|
||||
<TextBlock Text="{Binding From_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
Style="{StaticResource Filter_TextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<DatePicker SelectedDate="{Binding dtStartDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
Style="{StaticResource Filter_DatePicker}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"/>
|
||||
<TextBlock Text="{Binding To_Msg}"
|
||||
Style="{StaticResource Filter_TextBlock}"/>
|
||||
Style="{StaticResource Filter_TextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<DatePicker SelectedDate="{Binding dtEndDate}"
|
||||
Style="{StaticResource Filter_DatePicker}"/>
|
||||
Style="{StaticResource Filter_DatePicker}"
|
||||
CalendarStyle="{StaticResource Filter_Calendar}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
@@ -67,35 +72,50 @@
|
||||
SelectedItem="{Binding SelFilterType}"
|
||||
Width="105"
|
||||
Margin="5"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding SearchText}"
|
||||
Margin="5"
|
||||
Visibility="{Binding SearchText_Visibility}"/>
|
||||
Visibility="{Binding SearchText_Visibility}"
|
||||
Style="{StaticResource NewSearchText_TextBox}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="Rows"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
Style="{StaticResource OptionTextBlock}"
|
||||
Foreground="{StaticResource BeamWall_Corduroy}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
SelectedIndex="{Binding SelRowQuantity}"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
Width="55"
|
||||
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<Border Grid.Row="1" Style="{StaticResource OnlyProdPage_Border}" Margin="1"/>
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Single"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="5"
|
||||
BindingColumns="{Binding ProjectColumns}">
|
||||
BindingColumns="{Binding ProjectColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderBackground="{StaticResource BeamWall_Teal}"
|
||||
ColumnHeaderForeground="{StaticResource BeamWall_White}"
|
||||
ColumnHeaderHorizontalContentAlignment="Center"
|
||||
ColumnHeaderFontWeight="Bold"
|
||||
ColumnHeaderFontSize="15"
|
||||
ColumnHeaderPadding="0,2,0,2"
|
||||
Style="{StaticResource DataGrid_OnlyProd}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="IsEnabled" Value="{Binding bIsEnabled}"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ProjectList_MouseDoubleClick"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.Resources>
|
||||
<!-- ProjId -->
|
||||
<DataGridTextColumn x:Key="colPROJID" Binding="{Binding sProjId}">
|
||||
@@ -164,24 +184,18 @@
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Resources>
|
||||
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="IsEnabled" Value="{Binding bIsEnabled}"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ProjectList_MouseDoubleClick"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
</EgtBEAMWALL:EgtDataGrid>
|
||||
|
||||
<UniformGrid Columns="3" Grid.Row="2" Margin="0,0,0,5">
|
||||
<Button IsDefault="True" Name="OpenBtn"
|
||||
Content="{Binding Open_Msg}" Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
Content="{Binding Open_Msg}"
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Delete_Msg}"
|
||||
Command="{Binding Delete_Command}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button IsCancel="True"
|
||||
Content="{Binding Cancel_Msg}"
|
||||
Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
Style="{DynamicResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -84,42 +84,6 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
<!--<StackPanel>
|
||||
<Grid Grid.Row="0" Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*" />
|
||||
<RowDefinition Height="1*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding FilterType_Msg}"
|
||||
Grid.Row="0" Grid.Column="0"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding SearchColumnList}"
|
||||
SelectedItem="{Binding SelSearchColumn}"
|
||||
Width="Auto"
|
||||
Margin="5"
|
||||
Grid.Row="0" Grid.Column="1"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<TextBlock Text="{Binding Search_Msg}"
|
||||
Margin="0,5,0,0"
|
||||
Grid.Row="1" Grid.Column="0"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding SearchText}"
|
||||
Margin="5"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Visibility="{Binding SearchText_Visibility}"/>
|
||||
<Calendar SelectedDatesChanged="Calendar_SelectedDatesChanged"
|
||||
SelectionMode="MultipleRange"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Visibility="{Binding SearchDate_Visibility}"/>
|
||||
</Grid>
|
||||
</StackPanel>-->
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
@@ -130,6 +94,7 @@
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ColumnHeaderBackground="{x:Null}"
|
||||
Margin="5"
|
||||
BindingColumns="{Binding ProjectColumns}">
|
||||
<DataGrid.Resources>
|
||||
@@ -199,31 +164,7 @@
|
||||
<TextBlock Text="{Binding Path=DataContext.Name_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Delete -->
|
||||
<!--
|
||||
<DataGridTemplateColumn x:Key="colDELETE"
|
||||
Width="Auto"
|
||||
IsReadOnly="True">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="X"
|
||||
Command="{Binding Delete_Command}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>-->
|
||||
</DataGrid.Resources>
|
||||
<!--<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding OpenFileName}"
|
||||
Padding="4,1,4,1">
|
||||
<TextBlock.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick"
|
||||
Command="{Binding DataContext.ProjectDoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
||||
CommandParameter="{Binding nProjId}" />
|
||||
</TextBlock.InputBindings>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>-->
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="IsEnabled" Value="{Binding bIsEnabled}"/>
|
||||
@@ -232,38 +173,6 @@
|
||||
</DataGrid.RowStyle>
|
||||
</EgtBEAMWALL:EgtDataGrid>
|
||||
|
||||
<!--<ListBox Grid.Row="0"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
Margin="5">
|
||||
-->
|
||||
<!--<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ProjFileName}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>-->
|
||||
<!--
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
|
||||
<Setter Property="Padding" Value="0"></Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding OpenFileName}"
|
||||
Padding="4,1,4,1">
|
||||
<TextBlock.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick"
|
||||
Command="{Binding DataContext.ProjectDoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
||||
CommandParameter="{Binding nProjId}" />
|
||||
</TextBlock.InputBindings>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>-->
|
||||
|
||||
|
||||
<UniformGrid Columns="3" Grid.Row="2" Margin="0,0,0,5">
|
||||
<Button IsDefault="True" Name="OpenBtn"
|
||||
Content="{Binding Open_Msg}" Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
||||
|
||||
@@ -4,8 +4,6 @@ Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Data
|
||||
Imports System.Windows.Input
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -468,9 +466,9 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
NotifyPropertyChanged(NameOf(BTLDateTypeList))
|
||||
NotifyPropertyChanged(NameOf(SelBTLDateType))
|
||||
m_FilterTypeList = New ObservableCollection(Of IdNameStruct)({New IdNameStruct(FilterTypes.NULL, ""),
|
||||
New IdNameStruct(FilterTypes.ID, Id_Msg),
|
||||
New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
|
||||
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
|
||||
New IdNameStruct(FilterTypes.ID, Id_Msg),
|
||||
New IdNameStruct(FilterTypes.BTLFILENAME, BTLFileName_Msg),
|
||||
New IdNameStruct(FilterTypes.MACHINE, Machine_Msg)})
|
||||
m_SelFilterType = m_FilterTypeList.FirstOrDefault(Function(x) x.Id = FilterTypes.NULL)
|
||||
NotifyPropertyChanged(NameOf(SelFilterType))
|
||||
End If
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProdFileM
|
||||
Public Class ProdFileM
|
||||
Inherits ProjectFileM
|
||||
|
||||
Protected m_nProjIdList As List(Of Integer)
|
||||
@@ -52,36 +49,38 @@ Public Class ProdFileM
|
||||
|
||||
Public Shared Function CreateProdFileM(nProdId As Integer, nProjIdList As List(Of Integer), dtCreateProjDate As DateTime, sName As String, nType As BWType,
|
||||
sMachine As String, sLockedBy As String, dtLock As DateTime, bIsActive As Boolean, bIsProduced As Boolean, bIsArchived As Boolean) As ProdFileM
|
||||
Dim NewProjectFileM As New ProdFileM
|
||||
NewProjectFileM.m_nProdId = nProdId
|
||||
NewProjectFileM.m_nProjIdList = nProjIdList
|
||||
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
||||
NewProjectFileM.m_sName = sName
|
||||
NewProjectFileM.m_nType = nType
|
||||
NewProjectFileM.m_sMachine = sMachine
|
||||
NewProjectFileM.m_sLockedBy = sLockedBy
|
||||
NewProjectFileM.m_dtLock = dtLock
|
||||
NewProjectFileM.m_bIsActive = bIsActive
|
||||
NewProjectFileM.m_bIsProduced = bIsProduced
|
||||
NewProjectFileM.m_bIsArchived = bIsArchived
|
||||
Dim NewProjectFileM As New ProdFileM With {
|
||||
.m_nProdId = nProdId,
|
||||
.m_nProjIdList = nProjIdList,
|
||||
.m_dtCreateDate = dtCreateProjDate,
|
||||
.m_sName = sName,
|
||||
.m_nType = nType,
|
||||
.m_sMachine = sMachine,
|
||||
.m_sLockedBy = sLockedBy,
|
||||
.m_dtLock = dtLock,
|
||||
.m_bIsActive = bIsActive,
|
||||
.m_bIsProduced = bIsProduced,
|
||||
.m_bIsArchived = bIsArchived
|
||||
}
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProdFileM(nProdId As Integer, nProjIdList As List(Of Integer), dtCreateProjDate As DateTime, sName As String, nType As BWType,
|
||||
sMachine As String, sLockedBy As String, dtLock As DateTime, bIsActive As Boolean, bIsProduced As Boolean, bIsArchived As Boolean, ProjMList As List(Of ProjFileM)) As ProdFileM
|
||||
Dim NewProjectFileM As New ProdFileM
|
||||
NewProjectFileM.m_nProdId = nProdId
|
||||
NewProjectFileM.m_nProjIdList = nProjIdList
|
||||
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
||||
NewProjectFileM.m_sName = sName
|
||||
NewProjectFileM.m_nType = nType
|
||||
NewProjectFileM.m_sMachine = sMachine
|
||||
NewProjectFileM.m_sLockedBy = sLockedBy
|
||||
NewProjectFileM.m_dtLock = dtLock
|
||||
NewProjectFileM.m_bIsActive = bIsActive
|
||||
NewProjectFileM.m_bIsProduced = bIsProduced
|
||||
NewProjectFileM.m_bIsArchived = bIsArchived
|
||||
NewProjectFileM.m_ProjMList = ProjMList
|
||||
Dim NewProjectFileM As New ProdFileM With {
|
||||
.m_nProdId = nProdId,
|
||||
.m_nProjIdList = nProjIdList,
|
||||
.m_dtCreateDate = dtCreateProjDate,
|
||||
.m_sName = sName,
|
||||
.m_nType = nType,
|
||||
.m_sMachine = sMachine,
|
||||
.m_sLockedBy = sLockedBy,
|
||||
.m_dtLock = dtLock,
|
||||
.m_bIsActive = bIsActive,
|
||||
.m_bIsProduced = bIsProduced,
|
||||
.m_bIsArchived = bIsArchived,
|
||||
.m_ProjMList = ProjMList
|
||||
}
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class ProdItem
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProjFileM
|
||||
Public Class ProjFileM
|
||||
Inherits ProjectFileM
|
||||
|
||||
Protected m_dtExportDate As DateTime
|
||||
@@ -48,20 +45,21 @@ Public Class ProjFileM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProjFileM(nProjId As Integer, nProdId As Integer, dtCreateProjDate As DateTime, dtExportDate As DateTime, sListName As String, sBTLFileName As String, sDescription As String, IsNew As Boolean, IsLocked As Boolean, nType As BWType, sMachine As String, bIsActive As Boolean, bIsArchived As Boolean) As ProjFileM
|
||||
Dim NewProjectFileM As New ProjFileM
|
||||
NewProjectFileM.m_nProjId = nProjId
|
||||
NewProjectFileM.m_nProdId = nProdId
|
||||
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
||||
NewProjectFileM.m_dtExportDate = dtExportDate
|
||||
NewProjectFileM.m_sListName = sListName
|
||||
NewProjectFileM.m_sBTLFileName = sBTLFileName
|
||||
NewProjectFileM.m_sDescription = sDescription
|
||||
NewProjectFileM.m_bIsNew = IsNew
|
||||
NewProjectFileM.m_bIsLocked = IsLocked
|
||||
NewProjectFileM.m_nType = nType
|
||||
NewProjectFileM.m_sMachine = sMachine
|
||||
NewProjectFileM.m_bIsActive = bIsActive
|
||||
NewProjectFileM.m_bIsArchived = bIsArchived
|
||||
Dim NewProjectFileM As New ProjFileM With {
|
||||
.m_nProjId = nProjId,
|
||||
.m_nProdId = nProdId,
|
||||
.m_dtCreateDate = dtCreateProjDate,
|
||||
.m_dtExportDate = dtExportDate,
|
||||
.m_sListName = sListName,
|
||||
.m_sBTLFileName = sBTLFileName,
|
||||
.m_sDescription = sDescription,
|
||||
.m_bIsNew = IsNew,
|
||||
.m_bIsLocked = IsLocked,
|
||||
.m_nType = nType,
|
||||
.m_sMachine = sMachine,
|
||||
.m_bIsActive = bIsActive,
|
||||
.m_bIsArchived = bIsArchived
|
||||
}
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
|
||||
@@ -1,17 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProjectFileM
|
||||
|
||||
'Protected m_nProjectType As ProjectType
|
||||
'Public ReadOnly Property nProjectType As ProjectType
|
||||
' Get
|
||||
' Return m_nProjectType
|
||||
' End Get
|
||||
'End Property
|
||||
'Public Sub SetProjectType(nProjectType As ProjectType)
|
||||
' m_nProjectType = nProjectType
|
||||
'End Sub
|
||||
Public Class ProjectFileM
|
||||
|
||||
Protected m_nProjId As Integer = 0
|
||||
Public ReadOnly Property nProjId As Integer
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProjFileVM
|
||||
Public Class ProjFileVM
|
||||
Inherits ProjectFileVM
|
||||
|
||||
Public ReadOnly Property ProjFileM As ProjFileM
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class ProjectFileVM
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdSetUpWindowV"
|
||||
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"
|
||||
Title="{Binding TitleMsg}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseSetUpCommand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<Style x:Key="HorizontalScrollViewerItemsControlStyle" TargetType="{x:Type ItemsControl}">
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ItemsControl}">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" >
|
||||
<ItemsPresenter/>
|
||||
</ScrollViewer>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<UniformGrid Columns="4">
|
||||
<Button Content="{Binding ApplyMsg}" Command="{Binding ApplyCommand}"
|
||||
IsEnabled="{Binding IsEnabledApplyBtn}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding ArchiveMsg}" Command="{Binding ArchiveCommand}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding RetrievesMsg}" Command="{Binding RetrievesCommand}" Height="30"
|
||||
CommandParameter="{Binding SelectedItem,ElementName=ToolsTreeView}"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding AutomaticMsg}" Command="{Binding AutomaticCommand}" Height="30"
|
||||
CommandParameter="{Binding SelectedItem,ElementName=ToolsTreeView}"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TreeView Grid.Row="1" Name="ToolsTreeView" ItemsSource="{Binding ToolsList}">
|
||||
<TreeView.Style>
|
||||
<Style TargetType="{x:Type TreeView}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</TreeView.Style>
|
||||
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<EventSetter Event="MouseDoubleClick" Handler="Tool_DoubleClick"/>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolItem}" ItemsSource="{Binding Items}">
|
||||
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolItem}">
|
||||
<Grid Height="20" ToolTip="{Binding ToolTipMsg}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</TreeView.Resources>
|
||||
|
||||
</TreeView>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Source="{Binding SetUpImage}" MaxWidth="300"/>
|
||||
|
||||
<ItemsControl Grid.Column="1" ItemsSource="{Binding PositionGroupList}"
|
||||
Style="{DynamicResource HorizontalScrollViewerItemsControlStyle}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
<ItemsControl Grid.Column="1" ItemsSource="{Binding PositionList}" Margin="0,0,20,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="5,5,15,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding TcPos}"/>
|
||||
<ItemsControl Grid.Column="1" ItemsSource="{Binding ExitToolAssociationList}"
|
||||
HorizontalAlignment="Left">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<!--<WrapPanel Orientation="Horizontal" MaxWidth="200"/>-->
|
||||
<UniformGrid Columns="1"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="10,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Content="{Binding ExitPar}" Name="ExitBtn"
|
||||
CommandParameter="{Binding SelectedItem,ElementName=ToolsTreeView}"
|
||||
IsChecked="{Binding IsOccupied}" Height="25" Width="25" Margin="0,0,5,0"
|
||||
Command="{Binding SetUpToolCommand}"
|
||||
IsEnabled="{Binding IsEnabledPos}"
|
||||
Background="{Binding ExitBtnBackgroundCol}"/>
|
||||
<Border x:Name="ToolBorder" Grid.Column="1" BorderBrush="#4D84C4"
|
||||
BorderThickness="1" ToolTip="{Binding ToolTipMsg}">
|
||||
<Border.Style>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=ExitBtn, Path=IsChecked}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="{Binding Tool.Name}" Margin="3"/>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,31 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows.Controls
|
||||
Imports System.Windows.Input
|
||||
|
||||
Public Class OnlyProdSetUpWindowV
|
||||
|
||||
Private WithEvents m_SetUpWindowVM As SetUpWindowVM
|
||||
|
||||
Sub New(Owner As System.Windows.Window, SetUpWindowVM As SetUpWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = SetUpWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_SetUpWindowVM = SetUpWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub Tool_DoubleClick(sender As Object, e As MouseButtonEventArgs)
|
||||
Dim TreeViewItem As TreeViewItem = DirectCast(sender, TreeViewItem)
|
||||
If TypeOf TreeViewItem.DataContext Is ToolItem Then
|
||||
Dim SelTool As ToolItem = DirectCast(TreeViewItem.DataContext, ToolItem)
|
||||
m_SetUpWindowVM.ToolDoubleClick(SelTool)
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpWindowVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,138 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdToolDbWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="{Binding Title}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
CloseCommand="{Binding CloseToolsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding ReloadToolCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
<EgtWPFLib5:ToolDrawUUIDConverter x:Key="ToolDrawUUIDConverter"/>
|
||||
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.75*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<UniformGrid Grid.Row="0" Columns="3">
|
||||
<Button Content="{Binding NewMsg}" Command="{Binding NewCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding SaveMsg}" Command="{Binding SaveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding RemoveMsg}" Command="{Binding RemoveCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
||||
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TreeView Name="ToolsTreeView" Grid.Row="1" ItemsSource="{Binding ToolsList}">
|
||||
<TreeView.Style>
|
||||
<Style TargetType="{x:Type TreeView}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.35,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Concrete_Color}" Offset="0.45"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_White_Color}" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</TreeView.Style>
|
||||
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolTreeViewItem}" ItemsSource="{Binding Items}">
|
||||
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolTreeViewItem}">
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15" Margin="-15,0,5,0" VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Active}"
|
||||
Visibility="{Binding Path=DataContext.Active_Visibility,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding NamePar}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</TreeView.Resources>
|
||||
|
||||
</TreeView>
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Content="{Binding ImportMsg}"
|
||||
Command="{Binding ImportCommand}"
|
||||
IsEnabled="{Binding IsEnabledImpExpBtn, Mode=OneWay}"
|
||||
Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding ExportMsg}"
|
||||
Command="{Binding ExportCommand}"
|
||||
IsEnabled="{Binding IsEnabledImpExpBtn, Mode=OneWay}"
|
||||
Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
<Button Content="{Binding ResetMsg}"
|
||||
Command="{Binding ReloadToolCommand}"
|
||||
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"
|
||||
Height="30"
|
||||
Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1"/>
|
||||
|
||||
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
||||
<ContentControl Content="{Binding ToolSceneHost}" Grid.Column="2"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,33 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows.Input
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class OnlyProdToolDbWindowV
|
||||
|
||||
Private WithEvents m_ToolDbWindowVM As ToolDbWindowVM
|
||||
|
||||
Sub New(Owner As System.Windows.Window, ToolDbWindowVM As ToolDbWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = ToolDbWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_ToolDbWindowVM = ToolDbWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub ToolsDbView_Closed(bDialogResult As Boolean) Handles m_ToolDbWindowVM.m_CloseWindow
|
||||
' Imposto contesto generale
|
||||
EgtSetCurrentContext(ToolDbWindowVM.ProjectSceneContext)
|
||||
' Cancello contesto di visualizzazione utensile
|
||||
EgtDeleteContext(ToolDbWindowVM.ToolDbSceneContext)
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub ToolsDbView_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -68,23 +68,6 @@ Public Module BTLIniFile
|
||||
Return IpGRPList.Count > 0
|
||||
End Function
|
||||
|
||||
'Public Function GetBeamPrivateProfileVerifyGRP(IpAppName As String, IpGPRtoVerify As String) As Boolean
|
||||
' ' ciclo sui tipi di gruppo
|
||||
' Dim sBTLGroup As String = String.Empty
|
||||
' If EgtUILib.GetPrivateProfileString(IpAppName, BTL_FTR_GRP, String.Empty, sBTLGroup, m_sBTLIniFile) > 0 Then
|
||||
' Dim sBTLGroups() As String = sBTLGroup.Split(","c)
|
||||
' ' verifico numero minimo di parametri
|
||||
' If sBTLGroups.Count >= 0 Then
|
||||
' ' cancello spazi
|
||||
' For Index = 0 To sBTLGroups.Count - 1
|
||||
' sBTLGroups(Index) = sBTLGroups(Index).Trim()
|
||||
' Next
|
||||
' End If
|
||||
' Return sBTLGroups.Contains(IpGPRtoVerify)
|
||||
' End If
|
||||
' Return False
|
||||
'End Function
|
||||
|
||||
Public Function CalcBeamPrivateProfileGRP(nGRP As Integer) As Integer
|
||||
If nGRP = 1 Or nGRP = 2 Then
|
||||
Return 1
|
||||
@@ -126,7 +109,7 @@ Public Module BTLIniFile
|
||||
End Function
|
||||
|
||||
' funzione che ottiene il parametro P/Q usando m_nBTLBWType del modulo
|
||||
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean
|
||||
Public Function GetBeamPrivateProfileParam(IpGRP As Integer, IpPRC As Integer, IpVariant As Integer, IsP As Boolean, IpFeatureParamIndex As String, IpParentFeature As BTLFeatureM, ByRef IpBTLParam As BTLParamM) As Boolean
|
||||
Dim sBTLParam As String = String.Empty
|
||||
Dim sBWQParam As String = String.Empty
|
||||
If m_nBTLBWType = BWType.BEAM Then
|
||||
@@ -134,7 +117,7 @@ Public Module BTLIniFile
|
||||
ElseIf m_nBTLBWType = BWType.WALL Then
|
||||
sBWQParam = "W"
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & IpPRC, If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
|
||||
If EgtUILib.GetPrivateProfileString(CalcBeamPrivateProfileGRP(IpGRP) & "." & If(IpPRC = 900 AndAlso IpVariant > 0, IpPRC & "." & IpVariant, IpPRC), If(IsP, "P", "Q" & sBWQParam) & IpFeatureParamIndex, String.Empty, sBTLParam, m_sBTLIniFile) > 0 Then
|
||||
Dim sBTLParamParams() As String = sBTLParam.Split(","c)
|
||||
' verifico numero minimo di parametri
|
||||
If sBTLParamParams.Count >= 6 Then
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
Public Module Configuration
|
||||
Imports EgtWPFLib5
|
||||
Imports EgwProxy.LiMan
|
||||
|
||||
Public Module Configuration
|
||||
|
||||
' Test per comunicazione
|
||||
Public m_commLib As DataSyncro
|
||||
|
||||
''' <summary>
|
||||
''' Flag per impostare la visualizzazione con la singola pagina
|
||||
''' </summary>
|
||||
Private m_bOnlyProd As Boolean
|
||||
Public ReadOnly Property bOnlyProd As Boolean
|
||||
Get
|
||||
@@ -10,6 +19,9 @@
|
||||
m_bOnlyProd = value
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Flag per visualizzare il pulsante Db Attrezzaggi
|
||||
''' </summary>
|
||||
Private m_bModifySetup As Boolean
|
||||
Public ReadOnly Property bModifySetup As Boolean
|
||||
Get
|
||||
@@ -20,5 +32,94 @@
|
||||
m_bModifySetup = value
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Flag per salvare correttamente i dati nel file lua corretto
|
||||
''' </summary>
|
||||
Private m_bMachConfig As Boolean
|
||||
Public ReadOnly Property bMachConfig As Boolean
|
||||
Get
|
||||
Return m_bMachConfig
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetMachConfig(value As Boolean)
|
||||
m_bMachConfig = value
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Flag per impostare la visualizzazione con la singola pagina
|
||||
''' </summary>
|
||||
Private m_sServerAddressRelease As String
|
||||
Public ReadOnly Property sServerAddressRelease As String
|
||||
Get
|
||||
Return m_sServerAddressRelease
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetServerAddressRelease(value As String)
|
||||
m_sServerAddressRelease = value
|
||||
End Sub
|
||||
|
||||
' Versione attuale del programma
|
||||
Public ReadOnly Property ActualVersion As String
|
||||
Get
|
||||
Return My.Application.Info.Version.ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Funzione che recupera la directory del file INI
|
||||
''' </summary>
|
||||
Public Sub GetIniFileDirectory()
|
||||
' Impostazione path radice per i dati
|
||||
Dim m_sDataRoot As String = System.AppDomain.CurrentDomain.BaseDirectory
|
||||
If EgtUILib.GetPrivateProfileString(ConstGen.S_DATA, ConstGen.K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & ConstGen.DAT_FILE_NAME) = 0 Then
|
||||
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||
End If
|
||||
' Impostazione direttorio di configurazione
|
||||
Dim m_sConfigDir As String = m_sDataRoot & "\" & ConstGen.CONF_DIR
|
||||
' Impostazione path Ini file
|
||||
IniFile.m_sIniFile = m_sConfigDir & "\" & Core.ConstIni.INI_FILE_NAME
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Funzione per recuperare bOnlyProd
|
||||
''' </summary>
|
||||
''' <param name="Section">Sezione dove si trova la variabile che devo cercare</param>
|
||||
''' <param name="Key">Variabile che sto cercando</param>
|
||||
''' <param name="Path">Cartella dove e' presente il file ini</param>
|
||||
''' <param name="Default_Value">Valore di defaul opzionabile</param>
|
||||
''' <returns></returns>
|
||||
Public Function Read_Value(Section As String, Key As String, Path As String, Optional Default_Value As String = "") As String
|
||||
Dim Reader_Lines As String() = System.IO.File.ReadAllLines(Path)
|
||||
Dim Current_Section As String = ""
|
||||
|
||||
For Each Reader_Line As String In Reader_Lines
|
||||
|
||||
If Reader_Line.StartsWith("[") AndAlso Reader_Line.EndsWith("]") Then
|
||||
Current_Section = Reader_Line
|
||||
ElseIf Current_Section.Equals($"[{Section}]") Then
|
||||
Dim lineParts As String() = Reader_Line.Split({"="c}, 2)
|
||||
|
||||
If lineParts.Length >= 1 AndAlso lineParts(0) = Key Then
|
||||
Return If(lineParts.Length >= 2, lineParts(1), Default_Value)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Default_Value
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Metodo che controlla la comunicazione server
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function GetComunication() As Boolean
|
||||
' eseguo test per comunicazione server (ping, alive)
|
||||
m_commLib = New DataSyncro(EgtBEAMWALL.Core.Configuration.sServerAddressRelease)
|
||||
If m_commLib.CheckRemote() Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
@@ -2,326 +2,53 @@
|
||||
|
||||
Public Module CoreMap
|
||||
|
||||
'Private m_refMainWindowVM As MainWindowVM
|
||||
'Private m_refMyStatusBarVM As MyStatusBarVM
|
||||
'Private m_refProjManagerVM As ProjManagerVM
|
||||
'Private m_refProdManagerVM As ProdManagerVM
|
||||
'Private m_refProjectVM As ProjectVM
|
||||
'Private m_refMainMenuVM As MainMenuVM
|
||||
Private m_refMachinePanelVM As MachinePanelVM
|
||||
Private m_refMyMachGroupPanelVM As MyMachGroupPanelVM
|
||||
'Private m_refLeftPanelVM As LeftPanelVM
|
||||
'Private m_refBottomPanelVM As BottomPanelVM
|
||||
'Private m_refShowBeamPanelVM As ShowBeamPanelVM
|
||||
'Private m_refConfigurationPageVM As ConfigurationPageVM
|
||||
'Private m_refRawPartListVM As RawPartListVM
|
||||
'Private m_refPartInRawPartListVM As PartInRawPartListVM
|
||||
'Private m_refWarehouseWndVM As WarehouseWndVM
|
||||
'Private m_refFeatureListVM As FeatureListVM
|
||||
'Private m_refFreeContourManagerVM As FreeContourManagerVM
|
||||
'Private m_refFreeContourInputVM As FreeContourInputVM
|
||||
'Private m_refPartManagerVM As PartManagerVM
|
||||
'Private m_refInstrumentPanelVM As InstrumentPanelVM
|
||||
'Private m_refTopPanelVM As TopPanelVM
|
||||
'Private m_refOptimizePanelVM As OptimizePanelVM
|
||||
'Private m_refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
||||
|
||||
#Region "Get"
|
||||
|
||||
'Public ReadOnly Property refMainWindowVM As MainWindowVM
|
||||
' Get
|
||||
' Return m_refMainWindowVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refMyStatusBarVM As MyStatusBarVM
|
||||
' Get
|
||||
' Return LibMap.refStatusBarVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refProjManagerVM As ProjManagerVM
|
||||
' Get
|
||||
' Return m_refProjManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
'Public ReadOnly Property refProdManagerVM As ProdManagerVM
|
||||
' Get
|
||||
' Return m_refProdManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refProjectVM As ProjectVM
|
||||
' Get
|
||||
' Return m_refProjectVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property refSceneHostVM As SceneHostVM
|
||||
Get
|
||||
Return LibMap.refSceneHostVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public ReadOnly Property refShowPanelVM As ShowPanelVM
|
||||
' Get
|
||||
' Return LibMap.refShowPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refMainMenuVM As MainMenuVM
|
||||
' Get
|
||||
' Return m_refMainMenuVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property refMachinePanelVM As MachinePanelVM
|
||||
Get
|
||||
Return m_refMachinePanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public ReadOnly Property refLeftPanelVM As LeftPanelVM
|
||||
' Get
|
||||
' Return m_refLeftPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property refMachGroupPanelVM As MyMachGroupPanelVM
|
||||
Get
|
||||
Return m_refMyMachGroupPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public ReadOnly Property refBottomPanelVM As BottomPanelVM
|
||||
' Get
|
||||
' Return m_refBottomPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refShowBeamPanelVM As ShowBeamPanelVM
|
||||
' Get
|
||||
' Return m_refShowBeamPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refConfigurationPageVM As ConfigurationPageVM
|
||||
' Get
|
||||
' Return m_refConfigurationPageVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refRawPartListVM As RawPartListVM
|
||||
' Get
|
||||
' Return m_refRawPartListVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refPartInRawPartListVM As PartInRawPartListVM
|
||||
' Get
|
||||
' Return m_refPartInRawPartListVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refWarehouseWndVM As WarehouseWndVM
|
||||
' Get
|
||||
' Return m_refWarehouseWndVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refFeatureListVM As FeatureListVM
|
||||
' Get
|
||||
' Return m_refFeatureListVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refFreeContourManagerVM As FreeContourManagerVM
|
||||
' Get
|
||||
' Return m_refFreeContourManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refFreeContourInputVM As FreeContourInputVM
|
||||
' Get
|
||||
' Return m_refFreeContourInputVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refPartManagerVM As PartManagerVM
|
||||
' Get
|
||||
' Return m_refPartManagerVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refInstrumentPanelVM As MyInstrumentPanelVM
|
||||
' Get
|
||||
' Return m_refInstrumentPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refTopPanelVM As TopPanelVM
|
||||
' Get
|
||||
' Return m_refTopPanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refOptimizePanelVM As OptimizePanelVM
|
||||
' Get
|
||||
' Return m_refOptimizePanelVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
||||
' Get
|
||||
' Return m_refOpenProjectFileDialogVM
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
#Region "Set"
|
||||
|
||||
'Friend Function SetRefMyStatusBarVM(MyStatusBarVM As MyStatusBarVM) As Boolean
|
||||
' LibMap.SetRefStatusBarVM(MyStatusBarVM)
|
||||
' Return Not IsNothing(LibMap.refStatusBarVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefProjManagerVM(ProjManagerVM As ProjManagerVM) As Boolean
|
||||
' m_refProjManagerVM = ProjManagerVM
|
||||
' Return Not IsNothing(m_refProjManagerVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefProdManagerVM(ProdManagerVM As ProdManagerVM) As Boolean
|
||||
' m_refProdManagerVM = ProdManagerVM
|
||||
' Return Not IsNothing(m_refProdManagerVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
|
||||
' m_refProjectVM = ProjectVM
|
||||
' Return Not IsNothing(m_refProjectVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefMainMenuVM(MainMenuVM As MainMenuVM) As Boolean
|
||||
' m_refMainMenuVM = MainMenuVM
|
||||
' Return Not IsNothing(m_refMainMenuVM)
|
||||
'End Function
|
||||
|
||||
Public Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
|
||||
LibMap.SetRefSceneHostVM(SceneHostVM)
|
||||
Return Not IsNothing(LibMap.refSceneHostVM)
|
||||
End Function
|
||||
|
||||
'Friend Function SetRefShowPanelVM(ShowPanelVM As ShowPanelVM) As Boolean
|
||||
' LibMap.SetRefShowPanelVM(ShowPanelVM)
|
||||
' Return Not IsNothing(LibMap.refShowPanelVM)
|
||||
'End Function
|
||||
|
||||
Public Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
|
||||
m_refMachinePanelVM = MachinePanelVM
|
||||
Return Not IsNothing(m_refMachinePanelVM)
|
||||
End Function
|
||||
|
||||
'Friend Function SetRefLeftPanelVM(LeftPanelVM As LeftPanelVM) As Boolean
|
||||
' m_refLeftPanelVM = LeftPanelVM
|
||||
' Return Not IsNothing(m_refLeftPanelVM)
|
||||
'End Function
|
||||
|
||||
Public Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
|
||||
m_refMyMachGroupPanelVM = MachGroupPanelVM
|
||||
Return Not IsNothing(m_refMyMachGroupPanelVM)
|
||||
End Function
|
||||
|
||||
'Friend Function SetRefBottomPanelVM(BottomPanelVM As BottomPanelVM) As Boolean
|
||||
' m_refBottomPanelVM = BottomPanelVM
|
||||
' Return Not IsNothing(m_refBottomPanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefShowBeamPanelVM(ShowBeamPanelVM As ShowBeamPanelVM) As Boolean
|
||||
' m_refShowBeamPanelVM = ShowBeamPanelVM
|
||||
' Return Not IsNothing(m_refShowBeamPanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefConfigurationPageVM(ConfigurationPageVM As ConfigurationPageVM) As Boolean
|
||||
' m_refConfigurationPageVM = ConfigurationPageVM
|
||||
' Return Not IsNothing(m_refConfigurationPageVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefRawPartListVM(RawPartListVM As RawPartListVM) As Boolean
|
||||
' m_refRawPartListVM = RawPartListVM
|
||||
' Return Not IsNothing(m_refRawPartListVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefPartInRawPartListVM(PartInRawPartListVM As PartInRawPartListVM) As Boolean
|
||||
' m_refPartInRawPartListVM = PartInRawPartListVM
|
||||
' Return Not IsNothing(m_refPartInRawPartListVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefWarehouseWndVM(WarehouseWndVM As WarehouseWndVM) As Boolean
|
||||
' m_refWarehouseWndVM = WarehouseWndVM
|
||||
' Return Not IsNothing(m_refWarehouseWndVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefFeatureListVM(FeatureListVM As FeatureListVM) As Boolean
|
||||
' m_refFeatureListVM = FeatureListVM
|
||||
' Return Not IsNothing(m_refFeatureListVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefFreeContourManagerVM(FreeContourManagerVM As FreeContourManagerVM) As Boolean
|
||||
' m_refFreeContourManagerVM = FreeContourManagerVM
|
||||
' Return Not IsNothing(m_refFreeContourManagerVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefFreeContourInputVM(FreeContourInputVM As FreeContourInputVM) As Boolean
|
||||
' m_refFreeContourInputVM = FreeContourInputVM
|
||||
' Return Not IsNothing(m_refFreeContourInputVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefPartManagerVM(PartManagerVM As PartManagerVM) As Boolean
|
||||
' m_refPartManagerVM = PartManagerVM
|
||||
' Return Not IsNothing(m_refPartManagerVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefInstrumentPanelVM(InstrumentPanelVM As InstrumentPanelVM) As Boolean
|
||||
' m_refInstrumentPanelVM = InstrumentPanelVM
|
||||
' Return Not IsNothing(m_refInstrumentPanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefTopPanelVM(TopPanelVM As TopPanelVM) As Boolean
|
||||
' m_refTopPanelVM = TopPanelVM
|
||||
' Return Not IsNothing(m_refTopPanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefOptimizePanelVM(OptimizePanelVM As OptimizePanelVM) As Boolean
|
||||
' m_refOptimizePanelVM = OptimizePanelVM
|
||||
' Return Not IsNothing(m_refOptimizePanelVM)
|
||||
'End Function
|
||||
|
||||
'Friend Function SetRefOpenProjectFileDialogVM(OpenProjectFileDialogVM As OpenProjectFileDialogVM) As Boolean
|
||||
' m_refOpenProjectFileDialogVM = OpenProjectFileDialogVM
|
||||
' Return Not IsNothing(m_refOpenProjectFileDialogVM)
|
||||
'End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
#Region "Init"
|
||||
|
||||
'Friend Function BeginInit(MainWindowVM As MainWindowVM) As Boolean
|
||||
' m_refMainWindowVM = MainWindowVM
|
||||
' Return Not IsNothing(m_refMainWindowVM)
|
||||
'End Function
|
||||
Friend Function EndInit() As Boolean
|
||||
'Return Not IsNothing(m_refMainWindowVM) AndAlso Not IsNothing(m_refMainMenuVM) AndAlso
|
||||
' Not IsNothing(LibMap.refStatusBarVM) AndAlso Not IsNothing(m_refProjManagerVM) AndAlso
|
||||
' Not IsNothing(m_refProdManagerVM) AndAlso Not IsNothing(m_refConfigurationPageVM) AndAlso
|
||||
' Not IsNothing(LibMap.refSceneHostVM) AndAlso Not IsNothing(LibMap.refShowPanelVM) AndAlso
|
||||
' Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM) AndAlso
|
||||
' Not IsNothing(m_refRawPartListVM) AndAlso Not IsNothing(m_refWarehouseWndVM) AndAlso
|
||||
' Not IsNothing(m_refFeatureListVM) AndAlso Not IsNothing(m_refPartInRawPartListVM) AndAlso
|
||||
' Not IsNothing(m_refFreeContourManagerVM) AndAlso Not IsNothing(m_refFreeContourInputVM) AndAlso
|
||||
' Not IsNothing(m_refInstrumentPanelVM) AndAlso Not IsNothing(m_refTopPanelVM) AndAlso
|
||||
' Not IsNothing(m_refPartManagerVM) AndAlso Not IsNothing(m_refOptimizePanelVM) AndAlso
|
||||
' Not IsNothing(m_refShowBeamPanelVM) AndAlso Not IsNothing(m_refOpenProjectFileDialogVM) AndAlso
|
||||
' LibMap.EndInit()
|
||||
Return Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM)
|
||||
End Function
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports System.Collections.ObjectModel
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Controls
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class GridDimension
|
||||
|
||||
@@ -198,50 +198,55 @@
|
||||
#Region "Internal Methods"
|
||||
|
||||
Public Shared Function CreateAlarmLog(AlarmOperation As Integer, AlarmType As Integer, AlarmMessage As String, AlarmCode As String, AlarmDateTime As String)
|
||||
Dim NewMachLog As New MachLog
|
||||
NewMachLog.m_CommandType = LogCommandTypes.ALARM
|
||||
NewMachLog.m_AlarmOperation = AlarmOperation
|
||||
NewMachLog.m_AlarmType = AlarmType
|
||||
NewMachLog.m_AlarmMessage = AlarmMessage
|
||||
NewMachLog.m_AlarmCode = AlarmCode
|
||||
Dim NewMachLog As New MachLog With {
|
||||
.m_CommandType = LogCommandTypes.ALARM,
|
||||
.m_AlarmOperation = AlarmOperation,
|
||||
.m_AlarmType = AlarmType,
|
||||
.m_AlarmMessage = AlarmMessage,
|
||||
.m_AlarmCode = AlarmCode
|
||||
}
|
||||
DateTime.TryParse(AlarmDateTime, NewMachLog.m_AlarmDateTime)
|
||||
Return NewMachLog
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateOPStateLog(newOpState As Integer)
|
||||
Dim NewMachLog As New MachLog
|
||||
NewMachLog.m_CommandType = LogCommandTypes.NEWOP
|
||||
NewMachLog.m_newOpState = newOpState
|
||||
NewMachLog.m_AlarmDateTime = DateTime.Now()
|
||||
Dim NewMachLog As New MachLog With {
|
||||
.m_CommandType = LogCommandTypes.NEWOP,
|
||||
.m_newOpState = newOpState,
|
||||
.m_AlarmDateTime = DateTime.Now()
|
||||
}
|
||||
Return NewMachLog
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateReadLog(CommandExecutedCorrectly As Boolean, VarAddress As String, VarValue As String)
|
||||
Dim NewMachLog As New MachLog
|
||||
NewMachLog.m_CommandType = CommandTypes.READ_TPA
|
||||
NewMachLog.m_CommandExecutedCorrectly = CommandExecutedCorrectly
|
||||
NewMachLog.m_VarAddress = VarAddress
|
||||
NewMachLog.m_VarValue = VarValue
|
||||
NewMachLog.m_AlarmDateTime = DateTime.Now()
|
||||
Dim NewMachLog As New MachLog With {
|
||||
.m_CommandType = CommandTypes.READ_TPA,
|
||||
.m_CommandExecutedCorrectly = CommandExecutedCorrectly,
|
||||
.m_VarAddress = VarAddress,
|
||||
.m_VarValue = VarValue,
|
||||
.m_AlarmDateTime = DateTime.Now()
|
||||
}
|
||||
Return NewMachLog
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateResultLog(CommandType As LogCommandTypes, CommandState As CommandStates, ResultType As ResultTypes, Description As String)
|
||||
Dim NewMachLog As New MachLog
|
||||
NewMachLog.m_CommandType = CommandType
|
||||
NewMachLog.m_CommandState = CommandState
|
||||
NewMachLog.m_ResultType = ResultType
|
||||
NewMachLog.m_Description = Description
|
||||
NewMachLog.m_AlarmDateTime = DateTime.Now()
|
||||
Dim NewMachLog As New MachLog With {
|
||||
.m_CommandType = CommandType,
|
||||
.m_CommandState = CommandState,
|
||||
.m_ResultType = ResultType,
|
||||
.m_Description = Description,
|
||||
.m_AlarmDateTime = DateTime.Now()
|
||||
}
|
||||
Return NewMachLog
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateMachLog(EventType As MachLogTypes, EventDateTime As DateTime, Value As String, SupervisorID As String)
|
||||
Dim NewMachEvent As New MachLog
|
||||
NewMachEvent.m_ResultType = EventType
|
||||
NewMachEvent.m_AlarmDateTime = EventDateTime
|
||||
NewMachEvent.m_VarValue = Value
|
||||
NewMachEvent.m_VarAddress = SupervisorID
|
||||
Dim NewMachEvent As New MachLog With {
|
||||
.m_ResultType = EventType,
|
||||
.m_AlarmDateTime = EventDateTime,
|
||||
.m_VarValue = Value,
|
||||
.m_VarAddress = SupervisorID
|
||||
}
|
||||
Return NewMachEvent
|
||||
End Function
|
||||
|
||||
@@ -250,21 +255,21 @@
|
||||
#Region "Public Methods"
|
||||
|
||||
Public Shared Function CreateMachLog(AlarmCode As String, AlarmDateTime As Date, AlarmMessage As String, AlarmOperation As Integer, AlarmType As Integer, CommandExecutedCorrectly As Boolean, CommandState As CommandStates, CommandType As LogCommandTypes, Description As String, newOpState As Integer, ResultType As ResultTypes, VarAddress As String, VarValue As String) As MachLog
|
||||
|
||||
Dim NewMachLog As New MachLog
|
||||
NewMachLog.m_AlarmCode = AlarmCode
|
||||
NewMachLog.m_AlarmDateTime = AlarmDateTime
|
||||
NewMachLog.m_AlarmMessage = AlarmMessage
|
||||
NewMachLog.m_AlarmOperation = AlarmOperation
|
||||
NewMachLog.m_AlarmType = AlarmType
|
||||
NewMachLog.m_CommandExecutedCorrectly = CommandExecutedCorrectly
|
||||
NewMachLog.m_CommandState = CommandState
|
||||
NewMachLog.m_CommandType = CommandType
|
||||
NewMachLog.m_Description = Description
|
||||
NewMachLog.m_newOpState = newOpState
|
||||
NewMachLog.m_ResultType = ResultType
|
||||
NewMachLog.m_VarAddress = VarAddress
|
||||
NewMachLog.m_VarValue = VarValue
|
||||
Dim NewMachLog As New MachLog With {
|
||||
.m_AlarmCode = AlarmCode,
|
||||
.m_AlarmDateTime = AlarmDateTime,
|
||||
.m_AlarmMessage = AlarmMessage,
|
||||
.m_AlarmOperation = AlarmOperation,
|
||||
.m_AlarmType = AlarmType,
|
||||
.m_CommandExecutedCorrectly = CommandExecutedCorrectly,
|
||||
.m_CommandState = CommandState,
|
||||
.m_CommandType = CommandType,
|
||||
.m_Description = Description,
|
||||
.m_newOpState = newOpState,
|
||||
.m_ResultType = ResultType,
|
||||
.m_VarAddress = VarAddress,
|
||||
.m_VarValue = VarValue
|
||||
}
|
||||
|
||||
Return NewMachLog
|
||||
End Function
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Windows
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class SectionXMaterial
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="ViewPanelV"
|
||||
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" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
||||
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" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
||||
|
||||
<Button ToolTip="{Binding ZoomAllToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ViewPanelVM
|
||||
Inherits EgtWPFLib5.ViewPanelVM
|
||||
@@ -16,26 +15,6 @@ Public Class ViewPanelVM
|
||||
Private Shared m_nViewDir As VT = VT.ISO_SW
|
||||
|
||||
Public Shared Sub BWSetView(nView As VT, Optional bRedraw As Boolean = True)
|
||||
' condizioni che cambiano la vista del progetto
|
||||
'Select Case m_Type
|
||||
' Case BWType.BEAM
|
||||
' Select Case nView
|
||||
' Case VT.TOP
|
||||
' EgtSetView(VT.TOP, bRedraw)
|
||||
' Case VT.FRONT
|
||||
' EgtSetView(VT.FRONT, bRedraw)
|
||||
' Case VT.BACK
|
||||
' EgtSetView(VT.BACK, bRedraw)
|
||||
' Case VT.RIGHT
|
||||
' EgtSetView(VT.RIGHT, bRedraw)
|
||||
' Case VT.LEFT
|
||||
' EgtSetView(VT.LEFT, bRedraw)
|
||||
' Case VT.ISO_SW
|
||||
' EgtSetView(VT.ISO_SW, bRedraw)
|
||||
' Case Else ' VT.ISO_SW
|
||||
' EgtSetView(VT.ISO_SW, bRedraw)
|
||||
' End Select
|
||||
' Case BWType.WALL
|
||||
Select Case nView
|
||||
Case VT.TOP
|
||||
Select Case m_nViewDir
|
||||
@@ -155,32 +134,8 @@ Public Class ViewPanelVM
|
||||
|
||||
#End Region ' RightViewCommand
|
||||
|
||||
'#Region "IsoViewSECommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do IsoViewSE.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property IsoViewSECommand As ICommand
|
||||
' Get
|
||||
' If m_cmdIsoViewSE Is Nothing Then
|
||||
' m_cmdIsoViewSE = New Command(AddressOf IsoViewSE)
|
||||
' End If
|
||||
' Return m_cmdIsoViewSE
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the IsoViewSE. This method is invoked by the IsoViewSECommand.
|
||||
' ''' </summary>
|
||||
' Public Sub IsoViewSE(ByVal param As Object)
|
||||
' LibMap.refSceneHostVM.MainScene.IsoViewSE()
|
||||
' End Sub
|
||||
|
||||
'#End Region ' IsoViewSECommand
|
||||
|
||||
#Region "IsoViewSWCommand"
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Execute the IsoViewSW. This method is invoked by the IsoViewSWCommand.
|
||||
''' </summary>
|
||||
@@ -190,75 +145,6 @@ Public Class ViewPanelVM
|
||||
|
||||
#End Region ' IsoViewSWCommand
|
||||
|
||||
'#Region "IsoViewNECommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do IsoViewNE.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property IsoViewNECommand As ICommand
|
||||
' Get
|
||||
' If m_cmdIsoViewNE Is Nothing Then
|
||||
' m_cmdIsoViewNE = New Command(AddressOf IsoViewNE)
|
||||
' End If
|
||||
' Return m_cmdIsoViewNE
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the IsoViewNE. This method is invoked by the IsoViewNECommand.
|
||||
' ''' </summary>
|
||||
' Public Sub IsoViewNE(ByVal param As Object)
|
||||
' LibMap.refSceneHostVM.MainScene.IsoViewNE()
|
||||
' End Sub
|
||||
|
||||
'#End Region ' IsoViewNECommand
|
||||
|
||||
'#Region "IsoViewNWCommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do IsoViewNW.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property IsoViewNWCommand As ICommand
|
||||
' Get
|
||||
' If m_cmdIsoViewNW Is Nothing Then
|
||||
' m_cmdIsoViewNW = New Command(AddressOf IsoViewNW)
|
||||
' End If
|
||||
' Return m_cmdIsoViewNW
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the IsoViewNW. This method is invoked by the IsoViewNWCommand.
|
||||
' ''' </summary>
|
||||
' Public Sub IsoViewNW(ByVal param As Object)
|
||||
' LibMap.refSceneHostVM.MainScene.IsoViewNW()
|
||||
' End Sub
|
||||
|
||||
'#End Region ' IsoViewNWCommand
|
||||
|
||||
'#Region "ViewToCPlaneCommand"
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Returns a command that do GetDist.
|
||||
' ''' </summary>
|
||||
' Public ReadOnly Property ViewToCPlaneCommand As ICommand
|
||||
' Get
|
||||
' If m_cmdViewToCPlane Is Nothing Then
|
||||
' m_cmdViewToCPlane = New Command(AddressOf ViewToCPlane)
|
||||
' End If
|
||||
' Return m_cmdViewToCPlane
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' Execute the GetDist. This method is invoked by the GetDistCommand.
|
||||
' ''' </summary>
|
||||
' Public Sub ViewToCPlane(ByVal param As Object)
|
||||
' LibMap.refSceneHostVM.MainScene.CPlaneView()
|
||||
' End Sub
|
||||
|
||||
'#End Region ' ViewToCPlaneCommand
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EgwProxy.LiMan" version="1.0.2408.718" targetFramework="net472" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
||||
<package id="RestSharp" version="111.2.0" targetFramework="net472" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
|
||||
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net472" />
|
||||
<package id="System.Text.Json" version="8.0.3" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Egalware s.r.l.")]
|
||||
[assembly: AssemblyProduct("EgtBEAMWALL.DataLayer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.5.12.2")]
|
||||
[assembly: AssemblyFileVersion("2.5.12.2")]
|
||||
[assembly: AssemblyVersion("2.7.1.1")]
|
||||
[assembly: AssemblyFileVersion("2.7.1.1")]
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<Window x:Class="AboutBoxV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
|
||||
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
|
||||
|
||||
<Border BorderThickness="2" BorderBrush="LightBlue">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
<RowDefinition Height="0.15*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
<RowDefinition Height="0.35*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.35*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Name="LogoBrd" Grid.Column="1" Background="White">
|
||||
<Image Source="/Resources/AboutBox/EgalwareLogo.png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18" />
|
||||
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="12" />
|
||||
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
|
||||
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
|
||||
Margin="100,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,40 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class AboutBoxV
|
||||
|
||||
Private Sub AboutBoxWD_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
DescriptionLbl.Text = My.Application.Info.Description.ToString()
|
||||
VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() &
|
||||
"." & My.Application.Info.Version.Minor.ToString() &
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||
Dim sInfo As String = String.Empty
|
||||
Dim sKey As String = String.Empty
|
||||
EgtGetKeyInfo(sKey)
|
||||
Dim sKlev As String = Map.refMainWindowVM.MainWindowM.nKeyLevel.ToString()
|
||||
Dim sOpts As String = Map.refMainWindowVM.MainWindowM.nKeyOptions.ToString()
|
||||
Dim sLeftDays As String = ""
|
||||
Dim nLeftDays As Integer
|
||||
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
|
||||
sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
|
||||
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||
" (" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() & ")" & Environment.NewLine
|
||||
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
||||
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
|
||||
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
|
||||
Dim sOpSys As String = String.Empty
|
||||
EgtGetOsInfo( sOpSys)
|
||||
sInfo &= sOpSys & Environment.NewLine
|
||||
Dim sCPU As String = String.Empty
|
||||
EgtGetCpuInfo( sCPU)
|
||||
sInfo &= sCPU & Environment.NewLine
|
||||
Dim sScene As String = String.Empty
|
||||
EgtGetSceneInfo(sScene)
|
||||
sInfo &= sScene
|
||||
InfoLbl.Text = sInfo
|
||||
ExitBtn.Content = EgtMsg(10104) 'Ok
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class AddFeatureWndV
|
||||
|
||||
Private WithEvents m_AddFeatureWndVM As AddFeatureWndVM
|
||||
|
||||
Sub New(Owner As Window, AddFeatureWndVM As AddFeatureWndVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = AddFeatureWndVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_AddFeatureWndVM = AddFeatureWndVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddFeatureWndVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,90 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="AddFeatureWndV"
|
||||
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.Optimizer"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
IsClosable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
Title="AddProcess">
|
||||
<StackPanel Margin="5,5,5,0">
|
||||
<TabControl SelectedIndex="{Binding SelGRPType}">
|
||||
<TabItem Header="L"/>
|
||||
<TabItem Header="T"/>
|
||||
</TabControl>
|
||||
<Border Grid.Row="1"
|
||||
BorderThickness="1"
|
||||
BorderBrush="DarkGray"
|
||||
Background="White"
|
||||
Margin="0,-6,0,5">
|
||||
<Grid Margin="0,5,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid HorizontalAlignment="Center"
|
||||
Grid.Row="0"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Process"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding PRCList}"
|
||||
SelectedItem="{Binding nSelPRC}"
|
||||
Grid.Column="1"
|
||||
DisplayMemberPath="ghDesc"
|
||||
Width="200"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
<TextBlock Text="Macro"
|
||||
Grid.Row="1"
|
||||
Margin="0,5,0,0"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding MacroCustomList}"
|
||||
SelectedIndex="{Binding nSelMacroCustom}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
DisplayMemberPath="Name"
|
||||
IsEnabled="{Binding MacroList_IsEnabled}"
|
||||
Width="200"
|
||||
Margin="0,5,0,0"
|
||||
Style="{StaticResource FeatureComboBox}"/>
|
||||
</Grid>
|
||||
<Image Source="{Binding sDrawPath}"
|
||||
Grid.Row="1"
|
||||
Height="300"
|
||||
Width="300"
|
||||
Margin="5,0,5,5"/>
|
||||
<Grid Grid.Row="2" Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"
|
||||
IsDefault="True"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="Cancel"
|
||||
IsCancel="True"
|
||||
Grid.Column="3"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,451 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class AddFeatureWndVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
Friend m_MacroFilePathList As List(Of String)
|
||||
Friend m_MacroCustomFilePathList As List(Of String)
|
||||
|
||||
Private m_PrevSelPRCIndex_L As Integer = 0
|
||||
Private m_PrevSelPRCIndex_T As Integer = 0
|
||||
|
||||
Private m_SelGRPType As GRPType
|
||||
Public Property SelGRPType As Integer
|
||||
Get
|
||||
Return m_SelGRPType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SelGRPType = value
|
||||
' carico lista process
|
||||
Dim TempPRCList As New ObservableCollection(Of Integer)
|
||||
GetBeamPrivateProfileProcessList(m_SelGRPType, TempPRCList)
|
||||
m_PRCList.Clear()
|
||||
For Each PRC In TempPRCList
|
||||
' leggo gruppi
|
||||
Dim GRPList As New ObservableCollection(Of Integer)
|
||||
GetBeamPrivateProfileGRPList(m_SelGRPType, PRC, GRPList)
|
||||
m_PRCList.Add(New PRC(If(GRPList.Count > 0, GRPList(0), m_SelGRPType), PRC, GetBeamPrivateProfileName(m_SelGRPType, PRC)))
|
||||
Next
|
||||
If m_SelGRPType = GRPType.L Then
|
||||
nSelPRC = PRCList(m_PrevSelPRCIndex_L)
|
||||
ElseIf m_SelGRPType = GRPType.T Then
|
||||
nSelPRC = PRCList(m_PrevSelPRCIndex_T)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(PRCList))
|
||||
NotifyPropertyChanged(NameOf(nSelPRC))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_PRCList As New ObservableCollection(Of PRC)
|
||||
Public ReadOnly Property PRCList As ObservableCollection(Of PRC)
|
||||
Get
|
||||
Return m_PRCList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_PRCListView As New List(Of PRC)
|
||||
Public ReadOnly Property PRCListView As List(Of PRC)
|
||||
Get
|
||||
Return m_PRCListView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "New Macro OnlyProdPage"
|
||||
|
||||
Private m_MacroDefaultList As New ObservableCollection(Of Object)
|
||||
Public ReadOnly Property MacroDefaultList As ObservableCollection(Of Object)
|
||||
Get
|
||||
Return m_MacroDefaultList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nSelMacroDefault As Integer = -1
|
||||
Public Property nSelMacroDefault As Integer
|
||||
Get
|
||||
Return m_nSelMacroDefault
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If value <> m_nSelMacroDefault Then
|
||||
m_nSelMacroDefault = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' New Macro OnlyProdPage
|
||||
|
||||
Private m_nSelPRC As PRC = Nothing
|
||||
Public Property nSelPRC As PRC
|
||||
Get
|
||||
Return m_nSelPRC
|
||||
End Get
|
||||
Set(value As PRC)
|
||||
If value IsNot m_nSelPRC Then
|
||||
m_nSelPRC = value
|
||||
If Not IsNothing(m_nSelPRC) Then
|
||||
If SelGRPType = GRPType.L Then
|
||||
m_PrevSelPRCIndex_L = PRCList.IndexOf(m_nSelPRC)
|
||||
ElseIf SelGRPType = GRPType.T Then
|
||||
m_PrevSelPRCIndex_T = PRCList.IndexOf(m_nSelPRC)
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(sDrawPath))
|
||||
' carico eventuali file Macro
|
||||
MacroCustomList.Clear()
|
||||
If Core.Configuration.bOnlyProd Then
|
||||
MacroDefaultList.Clear()
|
||||
End If
|
||||
m_MacroFilePathList = New List(Of String)
|
||||
m_MacroCustomFilePathList = New List(Of String)
|
||||
If Not IsNothing(nSelPRC) Then
|
||||
Dim nGRPFromFileName As Integer = 0
|
||||
Dim nPRCFromFileName As Integer = 0
|
||||
Dim sMacroNameFromFileName As String = String.Empty
|
||||
Dim nIdMacroName As Integer = 0
|
||||
' ricavo lista file Macro Default
|
||||
GetMacroListDefault(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
||||
' ricavo lista file Macro Custom
|
||||
If Core.Configuration.bOnlyProd Then GetMacroListCustom(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
||||
If MacroCustomList.Count > 0 Then
|
||||
MacroList_IsEnabled = True
|
||||
Else
|
||||
MacroList_IsEnabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(nSelPRC))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MacroList_IsEnabled As Boolean
|
||||
Public Property MacroList_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_MacroList_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_MacroList_IsEnabled Then
|
||||
m_MacroList_IsEnabled = value
|
||||
NotifyPropertyChanged(NameOf(MacroList_IsEnabled))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MacroCustomList As New ObservableCollection(Of Object)
|
||||
Public ReadOnly Property MacroCustomList As ObservableCollection(Of Object)
|
||||
Get
|
||||
Return m_MacroCustomList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nSelMacroCustom As Integer = -1
|
||||
Public Property nSelMacroCustom As Integer
|
||||
Get
|
||||
Return m_nSelMacroCustom
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If value <> m_nSelMacroCustom Then
|
||||
m_nSelMacroCustom = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sDrawPath As String
|
||||
Get
|
||||
If IsNothing(m_nSelPRC) Then Return ""
|
||||
Dim sDescConstruction As String = String.Empty
|
||||
If m_SelGRPType = GRPType.L Then
|
||||
sDescConstruction = "L"
|
||||
Else
|
||||
sDescConstruction = "T"
|
||||
End If
|
||||
sDescConstruction &= m_nSelPRC.nPRC.ToString("000")
|
||||
Return Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & sDescConstruction & ".png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Process_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61805).ToUpper()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Default_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61899).ToUpper()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Custom_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61801).ToUpper()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OK_Msg As String
|
||||
Get
|
||||
Return EgtMsg(91651)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Cancel_Msg As String
|
||||
Get
|
||||
Return EgtMsg(91652)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
If Core.Configuration.bOnlyProd Then
|
||||
' carico lista process
|
||||
Dim TempPRCList As New ObservableCollection(Of Integer)
|
||||
Dim TempPRCLList As New ObservableCollection(Of Integer)
|
||||
Dim TempPRCLTist As New ObservableCollection(Of Integer)
|
||||
GetBeamPrivateProfileProcessList(0, TempPRCLList)
|
||||
GetBeamPrivateProfileProcessList(1, TempPRCLTist)
|
||||
' riporto le liste process in un unica lista
|
||||
For Each PRCL In TempPRCLList
|
||||
TempPRCList.Add(PRCL)
|
||||
Next
|
||||
For Each PRCT In TempPRCLTist
|
||||
TempPRCList.Add(PRCT)
|
||||
Next
|
||||
m_PRCList.Clear()
|
||||
' ciclo sulla lista process eliminado i doppi
|
||||
For Each PRC In TempPRCList.Distinct()
|
||||
' leggo gruppi
|
||||
Dim GRPLList As New ObservableCollection(Of Integer)
|
||||
Dim GRPTList As New ObservableCollection(Of Integer)
|
||||
GetBeamPrivateProfileGRPList(0, PRC, GRPLList)
|
||||
GetBeamPrivateProfileGRPList(1, PRC, GRPTList)
|
||||
If GRPLList.Count > 0 Then m_PRCList.Add(New PRC(GRPLList(0), PRC, GetBeamPrivateProfileName(0, PRC)))
|
||||
If GRPTList.Count > 0 Then m_PRCList.Add(New PRC(GRPTList(0), PRC, GetBeamPrivateProfileName(1, PRC)))
|
||||
Next
|
||||
m_PRCListView = m_PRCList.OrderBy(Function(x) x.nPRC).ToList()
|
||||
nSelPRC = m_PRCList(0)
|
||||
NotifyPropertyChanged(NameOf(PRCListView))
|
||||
NotifyPropertyChanged(NameOf(PRCList))
|
||||
Else
|
||||
SelGRPType = 0
|
||||
nSelPRC = PRCList(0)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Sub GetMacroListDefault(ByRef nGRPFromFileName As Integer, ByRef nPRCFromFileName As Integer, ByRef sMacroNameFromFileName As String, ByRef nIdMacroName As Integer)
|
||||
Dim AllFilesInDir As IEnumerable(Of String) = IO.Directory.EnumerateFiles(Map.refMainWindowVM.MainWindowM.sMacroCustomDir)
|
||||
For Each File In AllFilesInDir
|
||||
If Path.GetExtension(File).ToLower() = ".lua" Then
|
||||
If File.Contains(FILENAMESEPARATOR) Then
|
||||
Dim FileName As String = Path.GetFileNameWithoutExtension(File)
|
||||
Dim DataFromFileName As String() = FileName.Split(FILENAMESEPARATOR)
|
||||
If DataFromFileName.Count = 2 Then
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||
Dim NumbersFromFileName As String() = DataFromFileName(0).Split(".")
|
||||
Integer.TryParse(NumbersFromFileName(0), nGRPFromFileName)
|
||||
Integer.TryParse(NumbersFromFileName(1), nPRCFromFileName)
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||
sMacroNameFromFileName = DataFromFileName(1)
|
||||
End If
|
||||
If nGRPFromFileName = CalcBeamPrivateProfileGRP(nSelPRC.nGRP) AndAlso nPRCFromFileName = nSelPRC.nPRC Then
|
||||
If Core.Configuration.bOnlyProd Then
|
||||
MacroCustomList.Add(New NewMacro(nIdMacroName, sMacroNameFromFileName, Map.refMainWindowVM.MainWindowM.sMacroCustomDir & "\Template\" & sMacroNameFromFileName & ".png"))
|
||||
Else
|
||||
MacroCustomList.Add(New IdNameStruct(nIdMacroName, sMacroNameFromFileName))
|
||||
End If
|
||||
m_MacroFilePathList.Add(File)
|
||||
nIdMacroName += 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub GetMacroListCustom(ByRef nGRPFromFileName As Integer, ByRef nPRCFromFileName As Integer, ByRef sMacroNameFromFileName As String, ByRef nIdMacroName As Integer)
|
||||
nIdMacroName = 0
|
||||
Dim AllFilesInDirCustom As IEnumerable(Of String) = IO.Directory.EnumerateFiles(Map.refMainWindowVM.MainWindowM.sMacroDefaultDir)
|
||||
For Each File In AllFilesInDirCustom
|
||||
If Path.GetExtension(File).ToLower() = ".lua" Then
|
||||
If File.Contains(FILENAMESEPARATOR) Then
|
||||
Dim FileName As String = Path.GetFileNameWithoutExtension(File)
|
||||
Dim DataFromFileName As String() = FileName.Split(FILENAMESEPARATOR)
|
||||
If DataFromFileName.Count = 2 Then
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(0)) Then
|
||||
Dim NumbersFromFileName As String() = DataFromFileName(0).Split(".")
|
||||
Integer.TryParse(NumbersFromFileName(0), nGRPFromFileName)
|
||||
Integer.TryParse(NumbersFromFileName(1), nPRCFromFileName)
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(DataFromFileName(1)) Then
|
||||
sMacroNameFromFileName = DataFromFileName(1)
|
||||
End If
|
||||
If nGRPFromFileName = CalcBeamPrivateProfileGRP(nSelPRC.nGRP) AndAlso nPRCFromFileName = nSelPRC.nPRC Then
|
||||
MacroDefaultList.Add(New NewMacro(nIdMacroName, sMacroNameFromFileName))
|
||||
m_MacroCustomFilePathList.Add(File)
|
||||
nIdMacroName += 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Ok"
|
||||
|
||||
Public ReadOnly Property Ok_Command As ICommand
|
||||
Get
|
||||
If m_cmdOk Is Nothing Then
|
||||
m_cmdOk = New Command(AddressOf Ok)
|
||||
End If
|
||||
Return m_cmdOk
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Ok()
|
||||
'verifico che tutti i campi contengano un valore valido
|
||||
If Not IsNothing(m_nSelPRC) AndAlso m_nSelPRC.nPRC > 0 Then
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(61852), EgtMsg(30007))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Ok
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
Public Class PRC
|
||||
|
||||
' Processo
|
||||
Private m_nPRC As Integer
|
||||
Friend ReadOnly Property nPRC As Integer
|
||||
Get
|
||||
Return m_nPRC
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Gruppo
|
||||
Private m_nGRP As Integer
|
||||
Friend ReadOnly Property nGRP As Integer
|
||||
Get
|
||||
Return m_nGRP
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nSIDE As Integer = 2
|
||||
Public ReadOnly Property nSIDE As Integer
|
||||
Get
|
||||
Return m_nSIDE
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nVARIANT As Integer = 0
|
||||
Public ReadOnly Property nVARIANT As Integer
|
||||
Get
|
||||
Return m_nVARIANT
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Nome
|
||||
Private m_sName As String
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ghDesc As String
|
||||
Get
|
||||
Return If(m_nGRP = 1 OrElse m_nGRP = 2, "T", "L") & m_nPRC.ToString("000") & " " & m_sName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' lista dei parametri Q della feature
|
||||
Protected m_QBTLParamVMList As List(Of QBTLParamVM)
|
||||
Public Property QBTLParamVMList As List(Of QBTLParamVM)
|
||||
Get
|
||||
Return m_QBTLParamVMList
|
||||
End Get
|
||||
Set(value As List(Of QBTLParamVM))
|
||||
m_QBTLParamVMList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(GRP As Integer, PRC As Integer, Name As String)
|
||||
m_nPRC = PRC
|
||||
m_sName = Name
|
||||
m_nGRP = GRP
|
||||
End Sub
|
||||
|
||||
Sub New(GRP As Integer, PRC As Integer, Name As String, QBTLParamList As List(Of QBTLParamVM))
|
||||
m_nPRC = PRC
|
||||
m_sName = Name
|
||||
m_nGRP = GRP
|
||||
m_QBTLParamVMList = QBTLParamList
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class NewMacro
|
||||
|
||||
' Indice Macro
|
||||
Private m_nIndexMacro As Integer
|
||||
Public ReadOnly Property nIndexMacro As Integer
|
||||
Get
|
||||
Return m_nIndexMacro
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Nome Macro
|
||||
Private m_sMacroName As String
|
||||
Public ReadOnly Property sMacroName As String
|
||||
Get
|
||||
Return m_sMacroName.ToUpper()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Cartella dove sono contenuti i templete delle macro
|
||||
Private m_sMacroDrawPath As String
|
||||
Public ReadOnly Property sMacroDrawPath As String
|
||||
Get
|
||||
Return m_sMacroDrawPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(IndexMacro As Integer, MacroName As String)
|
||||
m_nIndexMacro = IndexMacro
|
||||
m_sMacroName = MacroName
|
||||
End Sub
|
||||
|
||||
Sub New(IndexMacro As Integer, MacroName As String, MacroDrawPath As String)
|
||||
m_nIndexMacro = IndexMacro
|
||||
m_sMacroName = MacroName
|
||||
m_sMacroDrawPath = MacroDrawPath
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,120 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="NewAddFeatureWndV"
|
||||
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"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
IsClosable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
Title="AddProcess"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<Grid Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" CornerRadius="4,0,0,4">
|
||||
<TextBlock Text="{Binding Process_Msg}"
|
||||
Style="{StaticResource ListTextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1"
|
||||
Style="{StaticResource OnlyProdPage_Border}"
|
||||
CornerRadius="4,0,0,4"
|
||||
BorderThickness="2,2,0,2">
|
||||
<ListBox Grid.Row="1"
|
||||
ItemsSource="{Binding PRCListView}"
|
||||
SelectedItem="{Binding nSelPRC}"
|
||||
Style="{StaticResource NewAddFeature_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ghDesc}"
|
||||
ToolTip="{Binding ghDesc}"
|
||||
TextAlignment="Justify"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Border>
|
||||
<Border Grid.Column="1" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2">
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding Custom_Msg}"
|
||||
Style="{StaticResource ListTextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource OnlyProdPage_Border}"
|
||||
CornerRadius="0"
|
||||
BorderThickness="0,2,0,2">
|
||||
<ListBox ItemsSource="{Binding MacroCustomList}"
|
||||
SelectedIndex="{Binding nSelMacroCustom}"
|
||||
Style="{StaticResource MacroCustom_ListBox}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Style="{StaticResource MacroCustom_WrapPanel}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding sMacroName}"
|
||||
Style="{StaticResource Macro_TextBlock}"/>
|
||||
<Image Grid.Row="1"
|
||||
Source="{Binding sMacroDrawPath}"
|
||||
Style="{StaticResource Macro_Image}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Border>
|
||||
<Border Grid.Column="2" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" Padding="0,10,0,10" CornerRadius="0,4,4,0">
|
||||
<TextBlock
|
||||
Text="{Binding Default_Msg}"
|
||||
Style="{StaticResource ListTextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Style="{StaticResource OnlyProdPage_Border}"
|
||||
CornerRadius="0,4,4,0"
|
||||
BorderThickness="0,2,2,2">
|
||||
<ListBox ItemsSource="{Binding MacroDefaultList}"
|
||||
SelectedIndex="{Binding nSelMacroDefault}"
|
||||
Style="{StaticResource MacroDefault_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sMacroName}"
|
||||
TextAlignment="Justify"
|
||||
Style="{StaticResource MacroDefault_TextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Border>
|
||||
<UniformGrid Columns="2"
|
||||
Grid.Row="2"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="5">
|
||||
<Button Content="{Binding OK_Msg}"
|
||||
Command="{Binding Ok_Command}"
|
||||
IsDefault="True"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="{Binding Cancel_Msg}"
|
||||
IsCancel="True"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,17 @@
|
||||
Public Class NewAddFeatureWndV
|
||||
|
||||
Private WithEvents m_AddFeatureWndVM As AddFeatureWndVM
|
||||
|
||||
Sub New(Owner As Window, AddFeatureWndVM As AddFeatureWndVM)
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
Me.DataContext = AddFeatureWndVM
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
m_AddFeatureWndVM = AddFeatureWndVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddFeatureWndVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,103 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="AddPartWndV"
|
||||
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.Optimizer"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
IsClosable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
Title="AddPartWndV">
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid HorizontalAlignment="Center"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Name"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sNAM}"
|
||||
Grid.Column="1"
|
||||
Width="200"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Prod Number"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding nPDN}"
|
||||
Grid.Column="1"
|
||||
Width="45"/>
|
||||
<TextBlock Text="Count"
|
||||
Grid.Column="2"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sCNT}"
|
||||
Grid.Column="3"
|
||||
Width="45"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="W"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sW}"
|
||||
Grid.Column="1"
|
||||
Width="45"/>
|
||||
<TextBlock Text="H"
|
||||
Grid.Column="2"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sH}"
|
||||
Grid.Column="3"
|
||||
Width="45"/>
|
||||
<TextBlock Text="L"
|
||||
Grid.Column="4"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sL}"
|
||||
Grid.Column="5"
|
||||
Width="45"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="3"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"
|
||||
IsDefault="True"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="Cancel"
|
||||
IsCancel="True"
|
||||
Grid.Column="3"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class AddPartWndV
|
||||
|
||||
Private WithEvents m_AddPartWndVM As AddPartWndVM
|
||||
|
||||
Sub New(Owner As Window, AddPartWndVM As AddPartWndVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = AddPartWndVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_AddPartWndVM = AddPartWndVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddPartWndVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,176 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class AddPartWndVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
Private m_nPDN As Integer
|
||||
Public Property nPDN As Integer
|
||||
Get
|
||||
Return m_nPDN
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPDN = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sNAM As String
|
||||
Public Property sNAM As String
|
||||
Get
|
||||
Return m_sNAM
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sNAM = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dL As Double
|
||||
Public ReadOnly Property dL As Double
|
||||
Get
|
||||
Return m_dL
|
||||
End Get
|
||||
End Property
|
||||
Public Property sL As String
|
||||
Get
|
||||
Return LenToString(m_dL, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dTempL As Double
|
||||
If StringToLenAdv(value, dTempL, True) AndAlso dTempL > 0 Then
|
||||
m_dL = dTempL
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sL))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dW As Double
|
||||
Public ReadOnly Property dW As Double
|
||||
Get
|
||||
Return m_dW
|
||||
End Get
|
||||
End Property
|
||||
Public Property sW As String
|
||||
Get
|
||||
Return LenToString(m_dW, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dTempW As Double
|
||||
If StringToLenAdv(value, dTempW, True) AndAlso dTempW > 0 Then
|
||||
EgtDraw()
|
||||
m_dW = dTempW
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sW))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_dH As Double
|
||||
Public ReadOnly Property dH As Double
|
||||
Get
|
||||
Return m_dH
|
||||
End Get
|
||||
End Property
|
||||
Public Property sH As String
|
||||
Get
|
||||
Return LenToString(m_dH, 3)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dTempH As Double
|
||||
If StringToLenAdv(value, dTempH, True) AndAlso dTempH > 0 Then
|
||||
EgtDraw()
|
||||
m_dH = dTempH
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sH))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sMAT As String
|
||||
Public Property sMAT As String
|
||||
Get
|
||||
Return m_sMAT
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMAT = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nCNT As Integer
|
||||
Public ReadOnly Property nCNT As Integer
|
||||
Get
|
||||
Return m_nCNT
|
||||
End Get
|
||||
End Property
|
||||
Public Property sCNT As String
|
||||
Get
|
||||
Return m_nCNT
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim nTempCNT As Integer
|
||||
If Integer.TryParse(value, nTempCNT) AndAlso nTempCNT > 0 Then
|
||||
m_nCNT = nTempCNT
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(sCNT))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.BTLPartVMList) Then
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
|
||||
m_dW = Map.refProjectVM.BTLStructureVM.SelBTLPart.dW
|
||||
m_dH = Map.refProjectVM.BTLStructureVM.SelBTLPart.dH
|
||||
m_dL = Map.refProjectVM.BTLStructureVM.SelBTLPart.dL
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
|
||||
m_dW = Map.refProjectVM.BTLStructureVM.BTLPartVMList(0).dW
|
||||
m_dH = Map.refProjectVM.BTLStructureVM.BTLPartVMList(0).dH
|
||||
m_dL = Map.refProjectVM.BTLStructureVM.BTLPartVMList(0).dL
|
||||
End If
|
||||
m_nPDN = Map.refProjectVM.BTLStructureVM.BTLStructureM.NewPDN()
|
||||
End If
|
||||
m_nCNT = 1
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Ok"
|
||||
|
||||
Public ReadOnly Property Ok_Command As ICommand
|
||||
Get
|
||||
If m_cmdOk Is Nothing Then
|
||||
m_cmdOk = New Command(AddressOf Ok)
|
||||
End If
|
||||
Return m_cmdOk
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Ok()
|
||||
'verifico che tutti i campi contengano un valore valido
|
||||
If Not IsNothing(m_dL) AndAlso m_dL > 0 AndAlso
|
||||
Not IsNothing(m_dW) AndAlso m_dW >= 0 AndAlso
|
||||
Not IsNothing(m_dH) AndAlso m_dH >= 0 Then
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(61853), EgtMsg(30007))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Ok
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,94 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdAddPartWndV"
|
||||
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"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
IsClosable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
Title="AddPartWndV"
|
||||
Style="{StaticResource OnlyProd_EgtCustomWindow}">
|
||||
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Style="{StaticResource OnlyProdAddPart_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Name"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sNAM}"
|
||||
Style="{StaticResource NAM_TextBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Prod Number"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding nPDN}"
|
||||
Style="{StaticResource Dimension_TextBox}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="Count"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="3"
|
||||
Text="{Binding sCNT}"
|
||||
Style="{StaticResource Dimension_TextBox}"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="W"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sW}"
|
||||
Style="{StaticResource Dimension_TextBox}"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="H"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="3"
|
||||
Text="{Binding sH}"
|
||||
Style="{StaticResource Dimension_TextBox}"/>
|
||||
<TextBlock Grid.Column="4"
|
||||
Text="L"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="5"
|
||||
Text="{Binding sL}"
|
||||
Style="{StaticResource Dimension_TextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<UniformGrid Grid.Row="3"
|
||||
Columns="2"
|
||||
Margin="0,5,0,5">
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"
|
||||
IsDefault="True"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
<Button Content="Cancel"
|
||||
IsCancel="True"
|
||||
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class OnlyProdAddPartWndV
|
||||
|
||||
Private WithEvents m_AddPartWndVM As AddPartWndVM
|
||||
|
||||
Sub New(Owner As Window, AddPartWndVM As AddPartWndVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = AddPartWndVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_AddPartWndVM = AddPartWndVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddPartWndVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,64 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="AddRawPartWndV"
|
||||
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.Optimizer"
|
||||
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
||||
WindowStyle="None" ResizeMode="NoResize"
|
||||
SizeToContent="WidthAndHeight"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
IsClosable="False"
|
||||
IsMinimizable="False"
|
||||
IsResizable="False"
|
||||
Title="AddRawPartWnd">
|
||||
<Grid Margin="5,5,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ComboBox ItemsSource="{Binding DimensionsList}"
|
||||
SelectedItem="{Binding SelDimension}"
|
||||
DisplayMemberPath="sDimension"
|
||||
Visibility="{Binding DimensionsList_Visibility}"
|
||||
Margin="0,0,0,5"/>
|
||||
<ItemsControl ItemsSource="{Binding VariableList}"
|
||||
Grid.Row="1">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding sMsg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding sValue}"
|
||||
Grid.Column="1"
|
||||
Width="65"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Grid Grid.Row="2"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"
|
||||
IsDefault="True"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
<Button Content="Cancel"
|
||||
IsCancel="True"
|
||||
Grid.Column="3"
|
||||
Style="{StaticResource EgtWPFLib5_InputButton}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,18 @@
|
||||
Public Class AddRawPartWndV
|
||||
|
||||
Private WithEvents m_AddRawPartWndVM As AddRawPartWndVM
|
||||
|
||||
Sub New(Owner As Window, AddRawPartWndVM As AddRawPartWndVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = AddRawPartWndVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_AddRawPartWndVM = AddRawPartWndVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddRawPartWndVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user