Compare commits

...

68 Commits

Author SHA1 Message Date
Emmanuele Sassi 121f02fb0c Merge branch 'RawPartLastCreation' into AddBeamPosZ 2022-11-25 15:05:41 +01:00
Emmanuele Sassi 848b6d98a5 - correzione creazione pezzi durante creazione grezzi 2022-11-25 15:02:09 +01:00
Emmanuele Sassi 0589565b8e Merge branch 'AddBeamPosZ' into RawPartLastCreation 2022-11-25 14:46:19 +01:00
Emmanuele Sassi 1109a91dd9 - Aggiunta colonna PosZ per Wall su Gruppo di lavorazione 2022-11-25 13:33:23 +01:00
DarioS 37cb1dbb6a EgtBEAMWALL 2.4k3 :
- correzione gestione spessori per nesting manuale pareti (ora si usano sempre operatori di SectionXMaterial).
2022-11-25 08:04:27 +01:00
Emmanuele Sassi 152788fe1b - modifiche per aggiunta grezzo durante definizione se non definito
- WIP modifiche per salvataggio ultimo usato per sezione
2022-11-24 16:30:56 +01:00
Emmanuele Sassi 534b363a04 Merge branch 'master' of https://gitlab.steamware.net/egaltech/egtbeamwall 2022-11-21 18:33:26 +01:00
DarioS 3f13706b97 EgtBEAMWALL 2.4k2 :
- ricompilazione di tutto con cambio versione.
2022-11-21 12:48:29 +01:00
Emmanuele Sassi 1f804ab6fc Merge branch 'develop' 2022-11-21 11:12:27 +01:00
Emmanuele Sassi 21dd6fbbb1 Merge branch 'RawPartCreation' 2022-11-18 14:15:41 +01:00
Emmanuele Sassi da73acc8a0 - Aggiunti tooltip su statistiche ed ultimi bottoni aggiunti
- Aggiunto bottone cancella tutti i grezzi
2022-11-18 14:15:11 +01:00
Emmanuele Sassi f9825db2ac - Modificata creazione grezzi con due bottoni 2022-11-18 11:44:38 +01:00
Emmanuele Sassi a3ea3bd1eb - Correzione problema check su cambio parametri
- Correzione indentazione DbController ViewerOptimizer
- Aggiornamento DbControllers Supervisor per gestione corretta network
-
2022-11-18 10:30:41 +01:00
DarioS 805a3acf54 EgtBEAMWALL :
- corretta gestione licenza con opzione rete abilitata quando si vuole lavorare con DB locale.
2022-11-08 19:13:10 +01:00
DarioS f21f2a6422 EgtBEAMWALL 2.4k1 :
- modifiche per visualizzazione numeri facce
- modifiche per visualizzazione lato di carico per travi.
2022-11-08 16:45:08 +01:00
Emmanuele Sassi 50d9603598 Merge remote-tracking branch 'gitlab.seriate/develop' into develop 2022-10-06 11:59:19 +02:00
Samuele Locatelli fae8018df9 Merge branch 'DataLayer' into develop 2022-09-19 19:41:46 +02:00
Samuele Locatelli 3b2715ee58 Merge branch 'DataLayer' 2022-09-19 19:41:37 +02:00
Samuele Locatelli d7c8e8e21d Gestione viste ext:
- aggiunto drop utente x RO
- fix solo 1 vistsa permessa
2022-09-19 19:41:18 +02:00
Samuele Locatelli 9d11e6e9ca Update chiamate da vb x avvio sw 2022-09-19 17:42:25 +02:00
Samuele Locatelli 8d90714a82 DB view readonly:
- Update x nuovo metodo creazione view
- check utente readonly + grant
2022-09-19 17:42:10 +02:00
Samuele Locatelli 429d7f58e4 Merge remote-tracking branch 'origin/master' into DataLayer 2022-09-19 12:36:55 +02:00
Emmanuele Sassi 7e15ef9dd1 Merge remote-tracking branch 'gitlab.seriate/master' into develop 2022-09-02 11:23:42 +02:00
DarioS 6060746412 EgtBEAMWALL 2.4h2 :
- sistemato nome file di log per calcolo grezzo in tutti i casi
- aggiunta ridisegna dopo ricalcolo grezzo.
2022-09-01 09:20:59 +02:00
Emmanuele Sassi 2b4f3d93dc Merge remote-tracking branch 'gitlab.seriate/master' into develop 2022-08-25 21:06:11 +02:00
DarioS f365c7a593 EgtBEAMWALL :
- correzione per modifica Outline e Aperture (riconoscimento chiusura automatica).
2022-08-25 21:03:34 +02:00
DarioS fc797ff4a7 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/egtbeamwall 2022-08-25 19:53:37 +02:00
Emmanuele Sassi 63b1f1532a - lettura da messaggi descrizione input ed output
- ampliamento spazio variabili da leggere
- correzione lettura log su selezione pagina
- aggiunte immaginin su parametri Q
2022-08-25 18:10:56 +02:00
DarioS b861c647fc EgtBEAMWALL 2.4h1 :
- sistemato AboutBox di Supervisor (grazie a app.manifest) come ViewerOptimizer
- aggiunti Tooltip a >> e << dove mancanti.
2022-08-18 10:11:04 +02:00
DarioS fa7d95cc53 EgtBEAMWALL :
- aggiunto app.manifest non inserito nel commit precedente.
2022-08-11 20:40:41 +02:00
DarioS cdb0414097 EgtBEAMWALL :
- sistemato aggiornamento disegno esplicativo parametro al cambio di gruppo della Feature
- aggiunto app.manifest per riconoscere correttamente il sistema operativo
- aggiunta ad AboutBox delle info sul sistema operativo.
2022-08-11 20:39:45 +02:00
Emmanuele Sassi 48ac0a878f - reso visibile a tutti bottone freecontour 2022-08-03 12:51:04 +02:00
Emmanuele Sassi 804992e485 - reso visibile a tutti bottone modifica freecontour 2022-08-03 12:50:34 +02:00
Emmanuele Sassi 4ef9497514 - Aggiornata versione a 2.4g5 2022-08-03 12:00:07 +02:00
Emmanuele Sassi 3c939a9e5b - aggiunta lettura vaolre di default feature testo 2022-08-03 11:39:24 +02:00
Emmanuele Sassi aaddb6897f - correzione visibilita' bottone edit freecontour 2022-08-03 10:02:23 +02:00
Emmanuele Sassi b0db630d56 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/egtbeamwall into develop 2022-08-03 09:59:21 +02:00
Emmanuele Sassi e608fd3a52 - Introdotta multiselezione per creazione nuova barra ed aggiunta a barra 2022-08-03 09:57:25 +02:00
Emmanuele Sassi 573cc1478a - corretto errore in rotazione multipezzo con assemblato attivo
- Aggiunti eventi inizio fine pezzo su comandi manuali
- aggiunti filtri in log macchina
2022-08-02 12:19:59 +02:00
DarioS 25d7516c7a EgtBEAMWALL 2.4g4 :
- ricompilazione con cambio versione
- modifiche per eliminare alcuni crash
- modifiche per eliminare i warning.
2022-08-01 17:08:40 +02:00
DarioS 8ac3c4879b EgtBEAMWALL :
- aggiunto controllo in salvataggio dati macchina.
2022-07-27 15:42:48 +02:00
DarioS b551120fcc EgtBEAMWALL
- sistemazione lancio simulazione in Supervisore
- sistemazione AboutBox in ViewerOptimizer
- sistemazione info programma in Supervisore
- eliminato file di costanti duplicato in ViewerOptimizer.
2022-07-25 10:49:56 +02:00
DarioS b1846bb804 EgtBEAMWALL :
- piccole modifiche ad AboutBox di ViewerOptimizer.
2022-07-24 19:56:03 +02:00
DarioS 399a1f466f EgtBeamWall :
- cambio a versione 2.4g3.
2022-07-24 16:36:06 +02:00
DarioS c1ca70adce Merge branch 'master' of https://gitlab.steamware.net/egaltech/egtbeamwall into develop 2022-07-24 16:34:50 +02:00
Emmanuele Sassi 364520f9a3 Merge remote-tracking branch 'gitlab.seriate/develop' into develop 2022-07-23 11:27:59 +02:00
Emmanuele Sassi c0bfe75fd7 - Correzione scrittura variabili V 2022-07-23 11:27:11 +02:00
DarioS 1d9618d797 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/egtbeamwall into develop 2022-07-22 08:31:33 +02:00
Emmanuele Sassi 1ac9f823a4 - Aggiornato numero di versione 2022-07-22 08:30:21 +02:00
DarioS 73950690ff Merge branch 'develop' of https://gitlab.steamware.net/egaltech/egtbeamwall into develop 2022-07-22 08:27:58 +02:00
Emmanuele Sassi 2bc79ad2de - Aggiunto cutid e taskid a barra di ripartenza
- Modifiche per log eventi nuovo
- Introdotta gestione cartelle con numero chiave in supervisore
- Aggiunta opzione AnyDb in supervisore
2022-07-22 08:03:32 +02:00
Samuele Locatelli 9ad45b9ea4 Merge branch 'develop' into DataLayer 2022-07-21 10:00:33 +02:00
Samuele Locatelli 89cb9e06f1 Refresh config setup in app.config 2022-07-21 10:00:20 +02:00
DarioS 3b77f647a6 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/egtbeamwall into develop 2022-07-21 07:08:09 +02:00
Samuele Locatelli 71c5b20782 Refresh configurazioni x EF6 2022-07-20 10:27:49 +02:00
Samuele Locatelli 08ac48d16e Merge branch 'DataLayer' into develop 2022-07-20 09:57:50 +02:00
Samuele Locatelli 90ac144f2a ancora cleanup EF6 2022-07-20 09:57:42 +02:00
Samuele Locatelli f5b98f803c Tolti riferimenti EF6 2022-07-20 09:57:36 +02:00
Samuele Locatelli 8f05ef25f6 Merge branch 'develop' into DataLayer 2022-07-20 09:43:51 +02:00
Samuele Locatelli 0022aacbd3 MySql EF:
- fix riferimenti 8.0.29 --> 8.0.21
2022-07-20 09:43:35 +02:00
Emmanuele Sassi ba64c8e231 Merge branch 'Selection&Highlight' into develop 2022-07-19 17:27:35 +02:00
DarioS 431c30935c Merge branch 'develop' of https://gitlab.steamware.net/egaltech/egtbeamwall into develop 2022-07-19 16:53:18 +02:00
Emmanuele Sassi 47d0fef508 Merge remote-tracking branch 'gitlab.seriate/DataLayer' into Selection&Highlight 2022-07-19 16:43:25 +02:00
Emmanuele Sassi 6decc2f690 Merge branch 'Selection&Highlight' into develop 2022-07-19 16:42:31 +02:00
Emmanuele Sassi 2bbd407019 - Correzione in assenza di macchine 2022-07-19 16:42:10 +02:00
Samuele Locatelli abc2c4fe07 Merge branch 'TestOracleMysql' into DataLayer 2022-07-19 16:40:29 +02:00
DarioS 402e17b57d Merge branch 'Selection&Highlight' of https://gitlab.steamware.net/egaltech/egtbeamwall into develop 2022-07-13 18:20:22 +02:00
Samuele Locatelli 08ae91e412 Merge branch 'develop' 2022-05-10 10:20:32 +02:00
87 changed files with 1465 additions and 809 deletions
+1 -1
View File
@@ -467,7 +467,7 @@ Public Class BTLFeatureM
If Param.nType = BTLParamType.DOUBLE_ Or Param.nType = BTLParamType.LENGTH Then If Param.nType = BTLParamType.DOUBLE_ Or Param.nType = BTLParamType.LENGTH Then
Param.SetValue(Param.dDefault) Param.SetValue(Param.dDefault)
ElseIf Param.nType = BTLParamType.STRING_ Then ElseIf Param.nType = BTLParamType.STRING_ Then
Param.SetValue("") Param.SetValue(Param.sDefault)
ElseIf Param.nType = BTLParamType.COMBO Then ElseIf Param.nType = BTLParamType.COMBO Then
Param.nSelValue = Param.dDefault Param.nSelValue = Param.dDefault
End If End If
+17 -2
View File
@@ -129,6 +129,16 @@ Public Class BTLParamM
End Set End Set
End Property End Property
Protected m_sDefault As String
Public Property sDefault As String
Get
Return m_sDefault
End Get
Set(value As String)
m_sDefault = value
End Set
End Property
' tipo della variabile ' tipo della variabile
Protected m_nType As BTLParamType Protected m_nType As BTLParamType
Public ReadOnly Property nType As BTLParamType Public ReadOnly Property nType As BTLParamType
@@ -136,6 +146,9 @@ Public Class BTLParamM
Return m_nType Return m_nType
End Get End Get
End Property End Property
Public Sub SetType(value As BTLParamType)
m_nType = value
End Sub
' Feature a cui appartiene il parametro ' Feature a cui appartiene il parametro
Protected m_ParentFeature As BTLFeatureM Protected m_ParentFeature As BTLFeatureM
@@ -245,16 +258,18 @@ Public Class BTLParamM
End Function End Function
' new per stringhe ' new per stringhe
Public Shared Function CreateBTLParam(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, sDescription As String) Public Shared Function CreateBTLParam(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, sDefault As String, sDescription As String)
Dim NewBTLParam As New BTLParamM Dim NewBTLParam As New BTLParamM
NewBTLParam.StdInit(ParentFeature, IsP, nType, sParamName, sDescription) NewBTLParam.StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
NewBTLParam.m_sDefault = sDefault
Return NewBTLParam Return NewBTLParam
End Function End Function
' new per stringhe (con tipo Beam o Wall) ' new per stringhe (con tipo Beam o Wall)
Public Shared Function CreateBTLParam(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, sDescription As String, sBWType As String) Public Shared Function CreateBTLParam(ParentFeature As BTLFeatureM, IsP As Boolean, nType As BTLParamType, sParamName As String, sDefault As String, sDescription As String, sBWType As String)
Dim NewBTLParam As New BTLParamM Dim NewBTLParam As New BTLParamM
NewBTLParam.StdInit(ParentFeature, IsP, nType, sParamName, sDescription) NewBTLParam.StdInit(ParentFeature, IsP, nType, sParamName, sDescription)
NewBTLParam.m_sDefault = sDefault
NewBTLParam.m_sBWType = sBWType NewBTLParam.m_sBWType = sBWType
Return NewBTLParam Return NewBTLParam
End Function End Function
+2 -2
View File
@@ -1210,7 +1210,7 @@ Public Class BTLPartM
Return New List(Of BTLFeatureM)(m_BTLFeatureMList) Return New List(Of BTLFeatureM)(m_BTLFeatureMList)
End Function End Function
Public Function Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional dAng As Double = 90) As Boolean Public Function Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional bRedraw As Boolean = True, Optional dAng As Double = 90) As Boolean
' recupero il box del pezzo ' recupero il box del pezzo
Dim nLs As Integer = EgtGetFirstNameInGroup(nPartId, "Box") Dim nLs As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
Dim b3Solid As New BBox3d Dim b3Solid As New BBox3d
@@ -1249,7 +1249,7 @@ Public Class BTLPartM
' ripristino inversione ' ripristino inversione
Inversion(SelectedMachineType) Inversion(SelectedMachineType)
End If End If
EgtDraw() If bRedraw Then EgtDraw()
Return bOk Return bOk
End Function End Function
+14 -4
View File
@@ -65,7 +65,7 @@ Public Module CalcIntegration
End If End If
ElseIf Bar.nProgramPage = ProjectType.PROD Then ElseIf Bar.nProgramPage = ProjectType.PROD Then
If Bar.nGlobState = CalcStates.NOTCALCULATED Then If Bar.nGlobState = CalcStates.NOTCALCULATED Then
Bar.sBarPath = CreateNewProjectFromMachGroup(Bar.nBarId, sProjDirPath) Bar.sBarPath = CreateNewProjectFromMachGroup(Bar.nBarId, sProjDirPath, Bar.nGlobState)
Else Else
Dim sMachGroupName As String = "" Dim sMachGroupName As String = ""
EgtGetMachGroupName(Bar.nBarId, sMachGroupName) EgtGetMachGroupName(Bar.nBarId, sMachGroupName)
@@ -78,7 +78,7 @@ Public Module CalcIntegration
If Bar.nProgramPage = ProjectType.PROJ Then If Bar.nProgramPage = ProjectType.PROJ Then
Bar.sBarPath = CreateNewProjectFromPart(Bar.nBarId, sProjDirPath) Bar.sBarPath = CreateNewProjectFromPart(Bar.nBarId, sProjDirPath)
ElseIf Bar.nProgramPage = ProjectType.PROD Then ElseIf Bar.nProgramPage = ProjectType.PROD Then
Bar.sBarPath = CreateNewProjectFromMachGroup(Bar.nBarId, sProjDirPath) Bar.sBarPath = CreateNewProjectFromMachGroup(Bar.nBarId, sProjDirPath, Bar.nGlobState)
End If End If
Next Next
End If End If
@@ -355,8 +355,14 @@ Public Module CalcIntegration
Return If(bOk, sPartFilePath, String.Empty) Return If(bOk, sPartFilePath, String.Empty)
End Function End Function
Private Function CreateNewProjectFromMachGroup(nMachGroupId As Integer, sProjDirPath As String) As String Private Function CreateNewProjectFromMachGroup(nMachGroupId As Integer, sProjDirPath As String, nGlobState As Integer) As String
If Not m_bIsSupervisor Then ' aggiorno cutid e taskid solo fuori dal supervisore o se pezzo ricalcolato
If Not m_bIsSupervisor OrElse nGlobState = CalcStates.NOTCALCULATED Then
Dim DisableMgr As DisableModifiedMgr = Nothing
If m_bIsSupervisor Then
' Disabilito segnalazione modificato
DisableMgr = New DisableModifiedMgr
End If
' Aggiorno identificativi per segnalazione errori ' Aggiorno identificativi per segnalazione errori
Dim nOldMachGroup As Integer = EgtGetCurrMachGroup() Dim nOldMachGroup As Integer = EgtGetCurrMachGroup()
If nMachGroupId <> nOldMachGroup Then EgtSetCurrMachGroup(nMachGroupId) If nMachGroupId <> nOldMachGroup Then EgtSetCurrMachGroup(nMachGroupId)
@@ -378,6 +384,10 @@ Public Module CalcIntegration
EgtResetCurrMachGroup() EgtResetCurrMachGroup()
End If End If
End If End If
If m_bIsSupervisor Then
' Ripristino stato segnalazione modifica
DisableMgr.ReEnable()
End If
End If End If
' Salvo gruppo di lavorazione nel suo progetto ' Salvo gruppo di lavorazione nel suo progetto
+1
View File
@@ -251,6 +251,7 @@
Public Const MGR_RPT_PANELLEN As String = "PANELLEN" Public Const MGR_RPT_PANELLEN As String = "PANELLEN"
Public Const MGR_RPT_PANELWIDTH As String = "PANELWIDTH" Public Const MGR_RPT_PANELWIDTH As String = "PANELWIDTH"
Public Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT" Public Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT"
Public Const MGR_RPT_PANELPOSZ As String = "PANELPOSZ"
Public Const MGR_RPT_PART As String = "PART" Public Const MGR_RPT_PART As String = "PART"
' parametri P per comunicazione con la macchina ' parametri P per comunicazione con la macchina
@@ -6,6 +6,7 @@
Public Const COL_STARTCUT As String = "colSTARTCUT" Public Const COL_STARTCUT As String = "colSTARTCUT"
Public Const COL_W As String = "colW" Public Const COL_W As String = "colW"
Public Const COL_L As String = "colL" Public Const COL_L As String = "colL"
Public Const COL_POSZ As String = "colPOSZ"
Public Const COL_ROT As String = "colROT" Public Const COL_ROT As String = "colROT"
Public Const COL_FLIP As String = "colFLIP" Public Const COL_FLIP As String = "colFLIP"
Public Const COL_POSX As String = "colPOSX" Public Const COL_POSX As String = "colPOSX"
@@ -149,6 +149,16 @@ Public Class MyMachGroupM
End Get End Get
End Property End Property
Protected m_dPosZ As Double = 0
Public Property dPosZ As Double
Get
Return m_dPosZ
End Get
Set(value As Double)
m_dPosZ = value
End Set
End Property
#End Region ' Wall #End Region ' Wall
#Region "Calc" #Region "Calc"
@@ -311,6 +321,7 @@ Public Class MyMachGroupM
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL) EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW) EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH) EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELPOSZ, NewMachGroupM.m_dPosZ)
NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW * NewMachGroupM.m_dH NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW * NewMachGroupM.m_dH
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM) NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
For Each Part In NewMachGroupM.m_PartMList For Each Part In NewMachGroupM.m_PartMList
@@ -343,6 +354,7 @@ Public Class MyMachGroupM
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL) EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW) EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH) EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELPOSZ, NewMachGroupM.m_dPosZ)
NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM) NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
For Each Part In NewMachGroupM.m_PartMList For Each Part In NewMachGroupM.m_PartMList
@@ -395,6 +395,7 @@ Public Class MyMachGroupPanelM
nPartId = EgtGetNextPart(nPartId) nPartId = EgtGetNextPart(nPartId)
End While End While
EgtResetCurrMachGroup() EgtResetCurrMachGroup()
Return ToRedrawMachGroupList
End Function End Function
Friend Shared Function DuploGetToDelete(nSouId As Integer, ByRef bToDelete As Boolean) As Boolean Friend Shared Function DuploGetToDelete(nSouId As Integer, ByRef bToDelete As Boolean) As Boolean
+2 -2
View File
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.7.1")> <Assembly: AssemblyVersion("2.4.11.3")>
<Assembly: AssemblyFileVersion("2.4.7.1")> <Assembly: AssemblyFileVersion("2.4.11.3")>
+2 -2
View File
@@ -159,7 +159,7 @@ Public Module BTLIniFile
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, ParamType, sBTLParamParams(1), dMin, dMax, dDefault, sBTLParamParams(5)) IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, ParamType, sBTLParamParams(1), dMin, dMax, dDefault, sBTLParamParams(5))
Return Not IsNothing(IpBTLParam) Return Not IsNothing(IpBTLParam)
ElseIf sBTLParamParams(0) = "s" Then ElseIf sBTLParamParams(0) = "s" Then
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, BTLParamType.STRING_, sBTLParamParams(1), sBTLParamParams(5)) IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, BTLParamType.STRING_, sBTLParamParams(1), sBTLParamParams(4), sBTLParamParams(5))
Return Not IsNothing(IpBTLParam) Return Not IsNothing(IpBTLParam)
ElseIf sBTLParamParams(0) = "c" Then ElseIf sBTLParamParams(0) = "c" Then
Dim nMin As Integer Dim nMin As Integer
@@ -212,7 +212,7 @@ Public Module BTLIniFile
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, ParamType, sBTLParamParams(1), dMin, dMax, dDefault, sBTLParamParams(5), sBWQParam) IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, ParamType, sBTLParamParams(1), dMin, dMax, dDefault, sBTLParamParams(5), sBWQParam)
Return Not IsNothing(IpBTLParam) Return Not IsNothing(IpBTLParam)
ElseIf sBTLParamParams(0) = "s" Then ElseIf sBTLParamParams(0) = "s" Then
IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, BTLParamType.STRING_, sBTLParamParams(1), sBTLParamParams(5), sBWQParam) IpBTLParam = BTLParamM.CreateBTLParam(IpParentFeature, IsP, BTLParamType.STRING_, sBTLParamParams(1), sBTLParamParams(4), sBTLParamParams(5), sBWQParam)
Return Not IsNothing(IpBTLParam) Return Not IsNothing(IpBTLParam)
ElseIf sBTLParamParams(0) = "c" Then ElseIf sBTLParamParams(0) = "c" Then
Dim nMin As Integer Dim nMin As Integer
+1 -1
View File
@@ -19,7 +19,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" /> <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.29.0" newVersion="8.0.29.0" /> <bindingRedirect oldVersion="0.0.0.0-8.0.21.0" newVersion="8.0.21.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+125 -26
View File
@@ -22,6 +22,8 @@ namespace EgtBEAMWALL.DataLayer.Controllers
{ {
// Initialize database context for ADMIN // Initialize database context for ADMIN
adbCtx = new AdminContext(DbConfig.ADMIN_CONNECTION_STRING); adbCtx = new AdminContext(DbConfig.ADMIN_CONNECTION_STRING);
// DB standard utente
dbCtx = new AdminContext(DbConfig.CONNECTION_STRING);
} }
#endregion Public Constructors #endregion Public Constructors
@@ -39,33 +41,10 @@ namespace EgtBEAMWALL.DataLayer.Controllers
{ {
bool answ = false; bool answ = false;
string domain = isNetwork ? "%" : "localhost"; string domain = isNetwork ? "%" : "localhost";
// ricerca utente... answ = doCheckCreate(username, pwd, answ, domain, false);
var numUser = adbCtx if (answ)
.UserList
.Where(x => x.User == username)
.ToList()
.Count;
if (numUser > 0)
{ {
answ = true; doGrantPriv(username, domain, "ALL ON *.*");
}
if (!answ)
{
// creo utente
string sqlCommand = "FLUSH PRIVILEGES;";
//string sqlCommand = $"CREATE USER '{username}'@'{domain}' IDENTIFIED BY '{pwd}'; GRANT ALL ON *.* TO '{username}'@'localhost'; FLUSH PRIVILEGES;";
//string sqlCommand = $"CREATE USER '{username}'@'{domain}' IDENTIFIED BY '{pwd}'; GRANT ALL ON *.* TO '{username}'@'localhost'; FLUSH PRIVILEGES;";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
sqlCommand = $"CREATE USER '{username}'@'{domain}' IDENTIFIED BY '{pwd}';";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
sqlCommand = $"GRANT ALL ON *.* TO '{username}'@'{domain}';";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
sqlCommand = "FLUSH PRIVILEGES;";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
} }
return answ; return answ;
} }
@@ -85,6 +64,51 @@ namespace EgtBEAMWALL.DataLayer.Controllers
adbCtx.Dispose(); adbCtx.Dispose();
} }
/// <summary>
/// Verifica esistenza views + utente relativo eventualmente ricreandole + fornendo accesso
/// all'utente ReadOnly Essetre
/// </summary>
/// <param name="dbName"></param>
/// <param name="username"></param>
/// <param name="pwd"></param>
/// <returns></returns>
public bool refreshViews(string dbName, string username = "S3_User", string pwd = "S3_P4ssw0rd")
{
bool answ = false;
// in primis refresh delle view
string sqlCommand = @"CREATE OR REPLACE VIEW v_expProdRaw AS
SELECT DbId, AlarmDtEvent AS DtEvent, VarValue,
SUBSTRING_INDEX(VarValue, ';', 1) AS Prod,
SUBSTRING_INDEX(SUBSTRING_INDEX(VarValue, ';', 2), ';', -1) AS MachGroupId,
SUBSTRING_INDEX(SUBSTRING_INDEX(VarValue, ';', -2), ';', 1) AS PartId,
SUBSTRING_INDEX(VarValue, ';', -1) AS Status
FROM logmachine
WHERE ResultType = 1
AND VarAddress = 1;
CREATE OR REPLACE VIEW v_expProd AS
SELECT vp.DtEvent, vp.Prod, mgl.Name AS mgName, pl.PDN, vp.`Status`
FROM v_expProdRaw AS vp
INNER JOIN MachGroupList mgl ON vp.MachGroupId = mgl.Id
INNER JOIN partlist pl ON vp.PartId = pl.Id;";
dbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
// ora setup parametri x utente
string domain = "%";
// ora controllo utente con diritti
answ = doCheckCreate(username, pwd, answ, domain, true);
if (answ)
{
doGrantPriv(username, domain, "USAGE ON *.*");
doGrantPriv(username, domain, $"SELECT ON {dbName}.v_expProd");
}
return answ;
}
/// <summary> /// <summary>
/// ATTENZIONE!!!! Procedura di Reset del DB /// ATTENZIONE!!!! Procedura di Reset del DB
/// </summary> /// </summary>
@@ -117,6 +141,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
#region Private Fields #region Private Fields
private AdminContext adbCtx; private AdminContext adbCtx;
private AdminContext dbCtx;
/// <summary> /// <summary>
/// Istanza logger /// Istanza logger
@@ -124,5 +149,79 @@ namespace EgtBEAMWALL.DataLayer.Controllers
private NLog.Logger Log = LogManager.GetCurrentClassLogger(); private NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields #endregion Private Fields
#region Private Methods
/// <summary>
/// Procedura interna effettiva di check utente ed eventuale creazione + grant level
/// </summary>
/// <param name="username"></param>
/// <param name="pwd"></param>
/// <param name="answ"></param>
/// <param name="domain"></param>
/// <param name="force">Force = esegue un drop prima...</param>
/// <returns></returns>
private bool doCheckCreate(string username, string pwd, bool answ, string domain, bool force)
{
// ricerca utente...
var numUser = adbCtx
.UserList
.Where(x => x.User == username)
.ToList()
.Count;
if (numUser > 0)
{
answ = true;
}
if (!answ)
{
// creo utente
string sqlCommand = $"DROP USER IF EXISTS {username};";
if (force)
{
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
}
sqlCommand = "FLUSH PRIVILEGES;";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
sqlCommand = $"CREATE USER '{username}'@'{domain}' IDENTIFIED BY '{pwd}';";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
sqlCommand = "FLUSH PRIVILEGES;";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
answ = true;
}
return answ;
}
/// <summary>
/// Procedura interna effettiva di grant level x utente
/// </summary>
/// <param name="username"></param>
/// <param name="domain"></param>
/// <param name="grantLevel"></param>
/// <returns></returns>
private bool doGrantPriv(string username, string domain, string grantLevel)
{
bool answ = false;
string sqlCommand = "FLUSH PRIVILEGES;";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
sqlCommand = $"GRANT {grantLevel} TO '{username}'@'{domain}';";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
sqlCommand = "FLUSH PRIVILEGES;";
adbCtx.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, sqlCommand);
Thread.Sleep(100);
answ = true;
return answ;
}
#endregion Private Methods
} }
} }
+13
View File
@@ -58,6 +58,19 @@ namespace EgtBEAMWALL.DataLayer
return Controllers.DbController.man.checkCreateUser(DATABASE_USER, DATABASE_PWD, isNetwork); return Controllers.DbController.man.checkCreateUser(DATABASE_USER, DATABASE_PWD, isNetwork);
} }
/// <summary>
/// Effettua verifica presenza view prod + relativo utente
/// </summary>
/// <param name="nKey"></param>
/// <param name="sKey"></param>
/// <param name="isNetwork"></param>
/// <returns></returns>
public static bool CheckViews(string nKey, string sKey)
{
// esecuzione script di install locale
return Controllers.DbController.man.refreshViews(DATABASE_NAME);
}
/// <summary> /// <summary>
/// Metodo di init standard per DB in rete con Master_Key /// Metodo di init standard per DB in rete con Master_Key
/// </summary> /// </summary>
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.7.1")] [assembly: AssemblyVersion("2.4.11.3")]
[assembly: AssemblyFileVersion("2.4.7.1")] [assembly: AssemblyFileVersion("2.4.11.3")]
+1 -1
View File
@@ -8,7 +8,7 @@
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6"/> <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6"/>
<providers> <providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers> </providers>
</entityFramework> </entityFramework>
<connectionStrings> <connectionStrings>
@@ -3,8 +3,7 @@ Imports EgtBEAMWALL.Core
Public Class AboutBoxV Public Class AboutBoxV
Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub AboutBoxWD_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
Me.Owner = Application.Current.MainWindow
DescriptionLbl.Text = My.Application.Info.Description.ToString() DescriptionLbl.Text = My.Application.Info.Description.ToString()
VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() & VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() &
"." & My.Application.Info.Version.Minor.ToString() & "." & My.Application.Info.Version.Minor.ToString() &
@@ -25,6 +24,9 @@ Public Class AboutBoxV
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & 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 Dim sCPU As String = String.Empty
EgtGetCpuInfo( sCPU) EgtGetCpuInfo( sCPU)
sInfo &= sCPU & Environment.NewLine sInfo &= sCPU & Environment.NewLine
@@ -32,7 +34,7 @@ Public Class AboutBoxV
EgtGetSceneInfo(sScene) EgtGetSceneInfo(sScene)
sInfo &= sScene sInfo &= sScene
InfoLbl.Text = sInfo InfoLbl.Text = sInfo
ExitBtn.Content = EgtMsg(constmsg.MSG_MISSINGKEYWD + 4) 'Ok ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
End Sub End Sub
End Class End Class
@@ -377,7 +377,8 @@ Public Class CALCPanelVM
.nProgramPage = ProjectType.PROD, .nProgramPage = ProjectType.PROD,
.nProjType = ProjType, .nProjType = ProjType,
.bBarOk = True, .bBarOk = True,
.nMachineName = MachineName} .nMachineName = MachineName,
.nGlobState = MachGroup.nGlobalState}
Select Case MachGroup.nGlobalState Select Case MachGroup.nGlobalState
Case Core.CalcStates.OK, Core.CalcStates.INFO Case Core.CalcStates.OK, Core.CalcStates.INFO
Bar.nCmdType = CalcIntegration.CmdTypes.GENERATE Bar.nCmdType = CalcIntegration.CmdTypes.GENERATE
@@ -500,7 +501,7 @@ Public Class CALCPanelVM
.bBarOk = True, .bBarOk = True,
.nMachineName = MachineName, .nMachineName = MachineName,
.nCmdType = CalcIntegration.CmdTypes.SIMULATE} .nCmdType = CalcIntegration.CmdTypes.SIMULATE}
If SelMachGroup.nGlobalState <> Core.CalcStates.OK Then If SelMachGroup.nGlobalState = CalcStates.NOTCALCULATED Then
Dim sMachGroupFilePath As String = Map.refSupervisorManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe" Dim sMachGroupFilePath As String = Map.refSupervisorManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe"
If File.Exists(sMachGroupFilePath) Then File.Delete(sMachGroupFilePath) If File.Exists(sMachGroupFilePath) Then File.Delete(sMachGroupFilePath)
End If End If
+3 -1
View File
@@ -501,7 +501,9 @@ Public Class NUMAxiumComm
Private Sub objDGeneralFunction_ProgramActivated(ByVal nerrorCode As Short) Private Sub objDGeneralFunction_ProgramActivated(ByVal nerrorCode As Short)
EgtOutLog("Part program activated:" & " " & nerrorCode) EgtOutLog("Part program activated:" & " " & nerrorCode)
DbControllers.m_LogMachineController.Create(MachLog.CreateResultLog(CommandTypes.SENDPROG, CommandStates.OK, ResultTypes.EXECUTED, "Part program activated:" & " " & nerrorCode)) 'DbControllers.m_LogMachineController.Create(MachLog.CreateResultLog(CommandTypes.SENDPROG, CommandStates.OK, ResultTypes.EXECUTED, "Part program activated:" & " " & nerrorCode))
' scrivo evento programma attivato
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachCommandLog(LogEvent.MachineCommands.PROGRAM_ACTIVATION, "", nerrorCode, DbControllers.SupervisorId))
End Sub End Sub
Private Sub objDGeneralFunction_OnCncStart(ByVal errorCode As Short) Private Sub objDGeneralFunction_OnCncStart(ByVal errorCode As Short)
@@ -255,11 +255,11 @@ Public Class NUMAxiumPcToolkitComm
m_MachManaging.SetConnected(True) m_MachManaging.SetConnected(True)
m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.OK, ResultTypes.RESULT, "") m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.OK, ResultTypes.RESULT, "")
End If End If
'''EgtOutLog("Activating program 9000") 'EgtOutLog("Activating program 9000")
' attivo programma main ' attivo programma main
Map.refMachManaging.Num_Axium_PCToolkit.ActivateProg(9000) Map.refMachManaging.Num_Axium_PCToolkit.ActivateProg(9000)
'''EgtOutLog("Activated program 9000") 'EgtOutLog("Activated program 9000")
Return True Return True
End Function End Function
@@ -391,9 +391,11 @@ Public Class NUMAxiumPcToolkitComm
nRes = WriteObjectVarious2(nPortFileTransfer, ACTIVE_PROG, PartProgramNumberActivate) nRes = WriteObjectVarious2(nPortFileTransfer, ACTIVE_PROG, PartProgramNumberActivate)
If nRes <> 0 Then If nRes <> 0 Then
EgtOutLog("Error Activate Program: " & nRes.ToString()) EgtOutLog("Error Activate Program: " & nRes.ToString())
Else 'Else
DbControllers.m_LogMachineController.Create(MachLog.CreateResultLog(CommandTypes.SENDPROG, CommandStates.OK, ResultTypes.EXECUTED, "Part program activated:" & " " & PartProgramNumberActivate)) ' DbControllers.m_LogMachineController.Create(MachLog.CreateResultLog(CommandTypes.SENDPROG, CommandStates.OK, ResultTypes.EXECUTED, "Part program activated:" & " " & PartProgramNumberActivate))
End If End If
' scrivo evento programma attivato
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachCommandLog(LogEvent.MachineCommands.PROGRAM_ACTIVATION, PartProgramNumberActivate, nRes <> 0, DbControllers.SupervisorId))
End Sub End Sub
Private Sub ChangeChannel(Channel As Short) Private Sub ChangeChannel(Channel As Short)
@@ -449,16 +451,16 @@ Public Class NUMAxiumPcToolkitComm
End Sub End Sub
Friend Sub CloseReadList() Friend Sub CloseReadList()
'''objDPlcVariables.CloseReadList() 'objDPlcVariables.CloseReadList()
End Sub End Sub
Private Sub ReadVariablesOnce(Address As String) Private Sub ReadVariablesOnce(Address As String)
'Dim _ReadSymbolicPlcVariableOnetime As String = "Application.IOCONFIG_GLOBALS.Flexium_NCK.RCNC.General.Mode" 'Dim _ReadSymbolicPlcVariableOnetime As String = "Application.IOCONFIG_GLOBALS.Flexium_NCK.RCNC.General.Mode"
'''Dim _FXReturn As Int16 = objDPlcVariables.ReadVariablesOnce(10, Address) 'Dim _FXReturn As Int16 = objDPlcVariables.ReadVariablesOnce(10, Address)
'''If _FXReturn <> 0 Then 'If _FXReturn <> 0 Then
''' EgtOutLog("Error ReadVariablesOnce:" & " " & _FXReturn.ToString()) ' EgtOutLog("Error ReadVariablesOnce:" & " " & _FXReturn.ToString())
'''End If 'End If
End Sub End Sub
@@ -512,7 +514,7 @@ Public Class NUMAxiumPcToolkitComm
End Sub End Sub
Friend Sub CloseReadELS() Friend Sub CloseReadELS()
'''objDPlcVariables.CloseReadList() 'objDPlcVariables.CloseReadList()
End Sub End Sub
Public Sub RefreshAllVars() Public Sub RefreshAllVars()
@@ -574,11 +576,11 @@ Public Class NUMAxiumPcToolkitComm
Case "%R3.2" Case "%R3.2"
nRet = ReadLadderVar(nPortVariables, R2, &H3, 1, MyData, SYN) nRet = ReadLadderVar(nPortVariables, R2, &H3, 1, MyData, SYN)
nRes = If(MyData.data(0) <> 0, 1, 0) nRes = If(MyData.data(0) <> 0, 1, 0)
'''EgtOutLog("Variabile: " & Var.sAddress & "DVal: " & nRes & " Valore: " & MyData.data(0) & "," & MyData.data(1) & "," & MyData.data(2) & "," & MyData.data(3)) 'EgtOutLog("Variabile: " & Var.sAddress & "DVal: " & nRes & " Valore: " & MyData.data(0) & "," & MyData.data(1) & "," & MyData.data(2) & "," & MyData.data(3))
Case "%R3.1" Case "%R3.1"
nRet = ReadLadderVar(nPortVariables, R1, &H3, 1, MyData, SYN) nRet = ReadLadderVar(nPortVariables, R1, &H3, 1, MyData, SYN)
nRes = If(MyData.data(0) <> 0, 1, 0) nRes = If(MyData.data(0) <> 0, 1, 0)
'''EgtOutLog("Variabile: " & Var.sAddress & "DVal: " & nRes & " Valore: " & MyData.data(0) & "," & MyData.data(1) & "," & MyData.data(2) & "," & MyData.data(3)) 'EgtOutLog("Variabile: " & Var.sAddress & "DVal: " & nRes & " Valore: " & MyData.data(0) & "," & MyData.data(1) & "," & MyData.data(2) & "," & MyData.data(3))
Case "%V800.L" Case "%V800.L"
nRet = ReadLadderVar(nPortVariables, VL, &H800, 4, MyData, SYN) nRet = ReadLadderVar(nPortVariables, VL, &H800, 4, MyData, SYN)
nRes = BitConverter.ToInt32(MyData.data, 0) nRes = BitConverter.ToInt32(MyData.data, 0)
@@ -900,10 +902,11 @@ Public Class NUMAxiumPcToolkitComm
Next Next
For index As Integer = 0 To ErrorNumber.Count - 1 For index As Integer = 0 To ErrorNumber.Count - 1
Dim Ind As Integer = index
Dim NewMessageInList As ReadMessages = m_ReadFXMessages.FirstOrDefault(Function(x) x.CMsgCncNumber = 0.ToString() AndAlso Dim NewMessageInList As ReadMessages = m_ReadFXMessages.FirstOrDefault(Function(x) x.CMsgCncNumber = 0.ToString() AndAlso
x.CMsgErrorType = 6.ToString() AndAlso x.CMsgErrorType = 6.ToString() AndAlso
x.CMsgErrorIndex = "" AndAlso x.CMsgErrorIndex = "" AndAlso
x.CMsgErrorNumber = ErrorNumber(index).ToString() AndAlso x.CMsgErrorNumber = ErrorNumber(Ind).ToString() AndAlso
x.CMsgErrorLine = "" AndAlso x.CMsgErrorLine = "" AndAlso
x.CMsgErrorMessage = "") x.CMsgErrorMessage = "")
' se il messaggio e' gia' in lista ' se il messaggio e' gia' in lista
@@ -1113,9 +1116,9 @@ Public Class NUMAxiumPcToolkitComm
Friend Sub ReadCncMode() Friend Sub ReadCncMode()
Dim nRet As Short = -1 Dim nRet As Short = -1
Dim nMode As UInt16 Dim nMode As UInt16
'''EgtOutLog("Pre ReadObjectVarious2") 'EgtOutLog("Pre ReadObjectVarious2")
nRet = ReadObjectVarious2(nPortVariables, eVarious2.MODE, nMode, SYN) nRet = ReadObjectVarious2(nPortVariables, eVarious2.MODE, nMode, SYN)
'''EgtOutLog("ReadObjectVarious2 Ret: " & nRet & " Mode: " & nMode) 'EgtOutLog("ReadObjectVarious2 Ret: " & nRet & " Mode: " & nMode)
If nRet <> 0 Then If nRet <> 0 Then
EgtOutLog("Reading CncMode failed! Error: " & nRet) EgtOutLog("Reading CncMode failed! Error: " & nRet)
Return Return
+29 -2
View File
@@ -53,7 +53,7 @@ Public Class NUMFlexiumComm
Private m_ReadFXMessages As New List(Of ReadMessages) Private m_ReadFXMessages As New List(Of ReadMessages)
Private m_ReadOperatorMessages As New List(Of ReadMessages) Private m_ReadOperatorMessages As New List(Of ReadMessages)
' lista variabili in lettura ' lista variabili in lettura
Private Shared m_ReadingVars(100) As CommVar Private Shared m_ReadingVars(230) As CommVar
Private m_BytesTransferedCounter As Integer Private m_BytesTransferedCounter As Integer
Private m_LinearAxisPrecision As Integer Private m_LinearAxisPrecision As Integer
@@ -368,6 +368,31 @@ Public Class NUMFlexiumComm
Friend Sub FileDownload(sFileType As String, sFilePath As String) Friend Sub FileDownload(sFileType As String, sFilePath As String)
Dim _Return_Download As Short Dim _Return_Download As Short
'' leggo variabile E30099
'Dim SendPermissionVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = SENDPERMISSION)
'Dim dTemp As Double = 0
'Dim nSendPermission As Integer = 0
'EgtOutLog("Inizio invio programma")
'While nSendPermission <> 2
' Dim bFirstWriteOne = True
' EgtOutLog("Inizio ciclo verifica diverso da 2")
' ' leggo valore
' If Not IsNothing(SendPermissionVariable.sValue) Then
' StringToDouble(SendPermissionVariable.sValue, dTemp)
' Integer.TryParse(dTemp, nSendPermission)
' EgtOutLog("Lettura variabile E30099: " & nSendPermission)
' Else
' EgtOutLog("nSendPermission = -1")
' nSendPermission = -1
' End If
' ' se uguale a zero ci scrivo uno
' If nSendPermission = 0 And bFirstWriteOne Then
' bFirstWriteOne = False
' SendPermissionVariable.sValue = 1
' EgtOutLog("Scrittura variabile E30099 = 1")
' End If
' Threading.Thread.Sleep(1000)
'End While
_Return_Download = objDFileTransfer.FileDownload2(10, sFileType, sFilePath, "", 1, 0) _Return_Download = objDFileTransfer.FileDownload2(10, sFileType, sFilePath, "", 1, 0)
@@ -451,7 +476,9 @@ Public Class NUMFlexiumComm
Private Sub objDGeneralFunction_ProgramActivated(ByVal nerrorCode As Short) Private Sub objDGeneralFunction_ProgramActivated(ByVal nerrorCode As Short)
EgtOutLog("Part program activated:" & " " & nerrorCode) EgtOutLog("Part program activated:" & " " & nerrorCode)
DbControllers.m_LogMachineController.Create(MachLog.CreateResultLog(CommandTypes.SENDPROG, CommandStates.OK, ResultTypes.EXECUTED, "Part program activated:" & " " & nerrorCode)) 'DbControllers.m_LogMachineController.Create(MachLog.CreateResultLog(CommandTypes.SENDPROG, CommandStates.OK, ResultTypes.EXECUTED, "Part program activated:" & " " & nerrorCode))
' scrivo evento programma attivato
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachCommandLog(LogEvent.MachineCommands.PROGRAM_ACTIVATION, "", nerrorCode, DbControllers.SupervisorId))
End Sub End Sub
Private Sub objDGeneralFunction_OnCncStart(ByVal errorCode As Short) Private Sub objDGeneralFunction_OnCncStart(ByVal errorCode As Short)
@@ -3,5 +3,7 @@
Public Const MDI_MSG As String = "MDI" Public Const MDI_MSG As String = "MDI"
Public Const PLC_MSG As String = "PLC" Public Const PLC_MSG As String = "PLC"
Public Const CNC_MSG As String = "CNC" Public Const CNC_MSG As String = "CNC"
Public Const INPUT_MSG As String = "INPUT"
Public Const OUTPUT_MSG As String = "OUTPUT"
End Module End Module
@@ -99,6 +99,9 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="APLog"> <Reference Include="APLog">
<HintPath>..\ExtLibs\APLog.dll</HintPath> <HintPath>..\ExtLibs\APLog.dll</HintPath>
@@ -543,6 +546,7 @@
<CustomToolNamespace>My.Resources</CustomToolNamespace> <CustomToolNamespace>My.Resources</CustomToolNamespace>
</EmbeddedResource> </EmbeddedResource>
<None Include="app.config" /> <None Include="app.config" />
<None Include="app.manifest" />
<None Include="My Project\Settings.settings"> <None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
@@ -81,6 +81,13 @@
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/> RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
</DataGridTextColumn.Header> </DataGridTextColumn.Header>
</DataGridTextColumn> </DataGridTextColumn>
<!--PosZ - Posizione in Z-->
<DataGridTextColumn x:Key="colPOSZ" Binding="{Binding sPosZ}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<!--MAT - Materiale--> <!--MAT - Materiale-->
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}"> <DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
<DataGridTextColumn.Header> <DataGridTextColumn.Header>
@@ -13,6 +13,13 @@ Public Class RawPartListVM
End Get End Get
End Property End Property
Private m_colRawPart_PosZ As EgtDataGridColumn
Public ReadOnly Property colRawPart_PosZ As EgtDataGridColumn
Get
Return m_colRawPart_PosZ
End Get
End Property
Private m_RawPartColumns As New ObservableCollection(Of EgtDataGridColumn) Private m_RawPartColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property RawPartColumns As ObservableCollection(Of EgtDataGridColumn) Public Property RawPartColumns As ObservableCollection(Of EgtDataGridColumn)
Get Get
@@ -55,6 +62,12 @@ Public Class RawPartListVM
End Get End Get
End Property End Property
Public ReadOnly Property PosZ_Msg As String
Get
Return EgtMsg(61728)
End Get
End Property
Public ReadOnly Property Material_Msg As String Public ReadOnly Property Material_Msg As String
Get Get
Return EgtMsg(61607) Return EgtMsg(61607)
@@ -84,23 +97,27 @@ Public Class RawPartListVM
Map.SetRefRawPartListVM(Me) Map.SetRefRawPartListVM(Me)
' carico le colonne della datagrid ' carico le colonne della datagrid
GetPrivateProfileColumns(S_RAWPARTLIST_SUPERVISOR, RawPartColumns) GetPrivateProfileColumns(S_RAWPARTLIST_SUPERVISOR, RawPartColumns)
' recupero riferimento a colonna StartCut ' recupero riferimento a colonna StartCut e PosZ
m_colRawPart_StartCut = m_RawPartColumns.FirstOrDefault(Function(x) x.Name = COL_STARTCUT) m_colRawPart_StartCut = m_RawPartColumns.FirstOrDefault(Function(x) x.Name = COL_STARTCUT)
m_colRawPart_PosZ = m_RawPartColumns.FirstOrDefault(Function(x) x.Name = COL_POSZ)
End Sub End Sub
#End Region ' CONSTRUCTOR #End Region ' CONSTRUCTOR
Friend Sub UpdateColumns(nMachType As MachineType) Friend Sub UpdateColumns(nMachType As MachineType)
If nMachType = MachineType.BEAM Then If nMachType = MachineType.BEAM Then
If Not IsNothing(m_colRawPart_StartCut) Then
m_colRawPart_StartCut.ColumnVisibility = Visibility.Visible
End If
'RawPartColumns.Clear()
'GetPrivateProfileColumns(S_RAWPARTLIST_BEAM, RawPartColumns)
' aggiorno la visibilità delle colonne ' aggiorno la visibilità delle colonne
For Each col In RawPartColumns For Each col In RawPartColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed) col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next Next
If Not IsNothing(m_colRawPart_StartCut) Then
m_colRawPart_StartCut.ColumnVisibility = Visibility.Visible
End If
If Not IsNothing(m_colRawPart_PosZ) Then
m_colRawPart_PosZ.ColumnVisibility = Visibility.Collapsed
End If
'RawPartColumns.Clear()
'GetPrivateProfileColumns(S_RAWPARTLIST_BEAM, RawPartColumns)
ElseIf nMachType = MachineType.WALL Then ElseIf nMachType = MachineType.WALL Then
' aggiorno la visibilità delle colonne ' aggiorno la visibilità delle colonne
For Each col In RawPartColumns For Each col In RawPartColumns
@@ -109,6 +126,9 @@ Public Class RawPartListVM
If Not IsNothing(m_colRawPart_StartCut) Then If Not IsNothing(m_colRawPart_StartCut) Then
m_colRawPart_StartCut.ColumnVisibility = Visibility.Collapsed m_colRawPart_StartCut.ColumnVisibility = Visibility.Collapsed
End If End If
If Not IsNothing(m_colRawPart_PosZ) Then
m_colRawPart_PosZ.ColumnVisibility = Visibility.Visible
End If
'RawPartColumns.Clear() 'RawPartColumns.Clear()
'GetPrivateProfileColumns(S_RAWPARTLIST_WALL, RawPartColumns) 'GetPrivateProfileColumns(S_RAWPARTLIST_WALL, RawPartColumns)
End If End If
@@ -810,6 +810,8 @@ Public Class LeftPanelVM
DbControllers.m_PartController.UpdateStatus(Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.WIP) DbControllers.m_PartController.UpdateStatus(Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.WIP)
Part.dtStartTime = Time Part.dtStartTime = Time
Part.nProduction_State = ItemState.WIP Part.nProduction_State = ItemState.WIP
' scrivo evento inizio pezzo su DB
DbControllers.m_LogMachineController.Create(LogEvent.CreatePartStateLog(Time - TimeSpan.FromSeconds(1), Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, 1, DbControllers.SupervisorId))
' se e' il primo ad essere lavorato ' se e' il primo ad essere lavorato
If Not MachGroup.PartVMList.Any(Function(x) x IsNot Part AndAlso x.dtStartTime > DateTime.MinValue) Then If Not MachGroup.PartVMList.Any(Function(x) x IsNot Part AndAlso x.dtStartTime > DateTime.MinValue) Then
' se non e' gia' in coda per essere prodotto ' se non e' gia' in coda per essere prodotto
@@ -837,6 +839,8 @@ Public Class LeftPanelVM
MachGroup.dtStartTime = Time MachGroup.dtStartTime = Time
MachGroup.nProduction_State = ItemState.WIP MachGroup.nProduction_State = ItemState.WIP
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.Production_Background)) MachGroup.NotifyPropertyChanged(NameOf(MachGroup.Production_Background))
' scrivo evento inizio MachGroup su DB
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachGroupStateLog(Time - TimeSpan.FromSeconds(1), Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, 1, DbControllers.SupervisorId))
' blocco produzione di tutti gli altri perche' iniziato questo ' blocco produzione di tutti gli altri perche' iniziato questo
MyMachGroupVM.UpdateProduceIsEnabledForAll() MyMachGroupVM.UpdateProduceIsEnabledForAll()
End If End If
@@ -846,6 +850,8 @@ Public Class LeftPanelVM
DbControllers.m_PartController.UpdateStatus(Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Produced) DbControllers.m_PartController.UpdateStatus(Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Produced)
Part.dtEndTime = Time Part.dtEndTime = Time
Part.nProduction_State = ItemState.Produced Part.nProduction_State = ItemState.Produced
' scrivo evento fine pezzo su DB
DbControllers.m_LogMachineController.Create(LogEvent.CreatePartStateLog(Time, Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, 2, DbControllers.SupervisorId))
If MachGroup.PartVMList.All(Function(x) x.nProduction_State >= ItemState.Produced) Then If MachGroup.PartVMList.All(Function(x) x.nProduction_State >= ItemState.Produced) Then
'aggiorno anche fine MachGroup 'aggiorno anche fine MachGroup
DbControllers.m_MachGroupController.UpdateEnd(Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, Time) DbControllers.m_MachGroupController.UpdateEnd(Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, Time)
@@ -861,6 +867,8 @@ Public Class LeftPanelVM
NotifyPropertyChanged(NameOf(DoneRawPart_IsEnabled)) NotifyPropertyChanged(NameOf(DoneRawPart_IsEnabled))
NotifyPropertyChanged(NameOf(MoveRawPart_IsEnabled)) NotifyPropertyChanged(NameOf(MoveRawPart_IsEnabled))
NotifyPropertyChanged(NameOf(ResetRawPart_IsEnabled)) NotifyPropertyChanged(NameOf(ResetRawPart_IsEnabled))
' scrivo evento fine MachGroup su DB
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachGroupStateLog(Time, Map.refSupervisorManagerVM.CurrProd.nProdId, MachGroup.Id, 2, DbControllers.SupervisorId))
' se avanzamento singolo, sblocco produzione di tutti gli altri ' se avanzamento singolo, sblocco produzione di tutti gli altri
If CurrentMachine.Flow = FlowTypes.ONEBYONE Then If CurrentMachine.Flow = FlowTypes.ONEBYONE Then
MyMachGroupVM.UpdateProduceIsEnabledForAll() MyMachGroupVM.UpdateProduceIsEnabledForAll()
@@ -541,14 +541,18 @@ Public Class MachCommandMessagePanelVM
Map.refMachManaging.Num_Axium_APServer.GetGeneralFunctions() Map.refMachManaging.Num_Axium_APServer.GetGeneralFunctions()
End If End If
End If End If
' scrivo evento programma attivato
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachCommandLog(LogEvent.MachineCommands.CONNECTION, "", 0, DbControllers.SupervisorId))
End If End If
Case CommandTypes.DISCONNECT Case CommandTypes.DISCONNECT
If CommandState = CommandStates.OK Then If CommandState = CommandStates.OK Then
_Connected = False _Connected = False
NotifyPropertyChanged(NameOf(Connect_Background)) NotifyPropertyChanged(NameOf(Connect_Background))
' scrivo evento programma attivato
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachCommandLog(LogEvent.MachineCommands.DISCONNECTION, "", 0, DbControllers.SupervisorId))
End If End If
End Select End Select
DbControllers.m_LogMachineController.Create(MachLog.CreateResultLog(CommandType, CommandState, ResultType, Params)) 'DbControllers.m_LogMachineController.Create(MachLog.CreateResultLog(CommandType, CommandState, ResultType, Params))
End Sub End Sub
Friend Sub CloseCallbackDlg(ByRef bCancel As Boolean) Friend Sub CloseCallbackDlg(ByRef bCancel As Boolean)
' serve? ' serve?
@@ -615,7 +619,8 @@ Public Class MachCommandMessagePanelVM
' fermo timer degli allarmi ' fermo timer degli allarmi
m_AlarmTimer.Stop() m_AlarmTimer.Stop()
End If End If
DbControllers.m_LogMachineController.Create(MachLog.CreateAlarmLog(AlarmOperation, AlarmType, AlarmMessage, AlarmCode, AlarmDateTime)) 'DbControllers.m_LogMachineController.Create(MachLog.CreateAlarmLog(AlarmOperation, AlarmType, AlarmMessage, AlarmCode, AlarmDateTime))
DbControllers.m_LogMachineController.Create(LogEvent.CreateAlarmLog(DateTime.Now(), AlarmOperation & LogEvent.cSeparator & AlarmType & LogEvent.cSeparator & AlarmMessage & LogEvent.cSeparator & AlarmCode & LogEvent.cSeparator & AlarmDateTime, DbControllers.m_SupervisorId))
End Sub End Sub
Friend Sub NUMAlarmCallbackDlg(ByVal CncNumber As Integer, ByVal AlarmOperation As Integer, ByVal ErrorTyp As String, ByVal ErrorIndex As String, ByVal ErrorNumber As String, ByVal ErrorLine As String, ByVal ErrorMessage As String, ByVal ErrorAdditional As String) Friend Sub NUMAlarmCallbackDlg(ByVal CncNumber As Integer, ByVal AlarmOperation As Integer, ByVal ErrorTyp As String, ByVal ErrorIndex As String, ByVal ErrorNumber As String, ByVal ErrorLine As String, ByVal ErrorMessage As String, ByVal ErrorAdditional As String)
@@ -785,7 +790,8 @@ Public Class MachCommandMessagePanelVM
' fermo timer degli allarmi ' fermo timer degli allarmi
m_AlarmTimer.Stop() m_AlarmTimer.Stop()
End If End If
DbControllers.m_LogMachineController.Create(MachLog.CreateAlarmLog(AlarmOperation, ErrorTyp, AlarmMessage, AlarmCode, DateTime.Now)) 'DbControllers.m_LogMachineController.Create(MachLog.CreateAlarmLog(AlarmOperation, ErrorTyp, AlarmMessage, AlarmCode, DateTime.Now))
DbControllers.m_LogMachineController.Create(LogEvent.CreateAlarmLog(DateTime.Now(), AlarmOperation & LogEvent.cSeparator & ErrorTyp & LogEvent.cSeparator & AlarmMessage & LogEvent.cSeparator & AlarmCode & LogEvent.cSeparator, DbControllers.m_SupervisorId))
End Sub End Sub
Friend Sub AxisCoordinatesCallbackDlg(AxisValue As Double, AxisIndex As Integer) Friend Sub AxisCoordinatesCallbackDlg(AxisValue As Double, AxisIndex As Integer)
@@ -808,7 +814,8 @@ Public Class MachCommandMessagePanelVM
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT
Map.refLeftPanelVM.SetOPState(NewState) Map.refLeftPanelVM.SetOPState(NewState)
End Select End Select
DbControllers.m_LogMachineController.Create(MachLog.CreateOPStateLog(newOpState)) 'DbControllers.m_LogMachineController.Create(MachLog.CreateOPStateLog(newOpState))
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachineStateLog(newOpState, DbControllers.m_SupervisorId))
End Sub End Sub
Friend Sub OpModeCallbackDlg(newOpState As Integer) Friend Sub OpModeCallbackDlg(newOpState As Integer)
@@ -821,7 +828,8 @@ Public Class MachCommandMessagePanelVM
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT
Map.refLeftPanelVM.SetOPMode(NewState) Map.refLeftPanelVM.SetOPMode(NewState)
End Select End Select
DbControllers.m_LogMachineController.Create(MachLog.CreateOPStateLog(newOpState)) 'DbControllers.m_LogMachineController.Create(MachLog.CreateOPStateLog(newOpState))
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachineModeLog(newOpState, DbControllers.m_SupervisorId))
End Sub End Sub
Friend Sub ChannelCallbackDlg(NewChannelId As Short) Friend Sub ChannelCallbackDlg(NewChannelId As Short)
@@ -840,8 +848,9 @@ Public Class MachCommandMessagePanelVM
Case "AsseX", "AsseY", "AsseZ", "AsseC", "AsseB" Case "AsseX", "AsseY", "AsseZ", "AsseC", "AsseB"
SetAxisValue(VarName, VarValue) SetAxisValue(VarName, VarValue)
End Select End Select
'DbControllers.m_LogMachineController.Create(MachLog.CreateReadLog(CommandExecutedCorrectly, VarAddress, VarValue))
DbControllers.m_LogMachineController.Create(LogEvent.CreateReadVarLog(VarAddress, VarValue, DbControllers.SupervisorId))
End If End If
DbControllers.m_LogMachineController.Create(MachLog.CreateReadLog(CommandExecutedCorrectly, VarAddress, VarValue))
End Sub End Sub
Private Sub SetAxisValue(VarName As String, VarValue As String) Private Sub SetAxisValue(VarName As String, VarValue As String)
@@ -362,7 +362,7 @@ Public Class MachManaging
Case NCTypes.NUM_AXIUM_PCTOOLKIT Case NCTypes.NUM_AXIUM_PCTOOLKIT
' leggo tutte le variabili ' leggo tutte le variabili
Num_Axium_PCToolkit.RefreshAllVars() Num_Axium_PCToolkit.RefreshAllVars()
'''EgtOutLog("Post lettura variabili") 'EgtOutLog("Post lettura variabili")
Dim dTemp As Double = 0 Dim dTemp As Double = 0
Dim nTemp As Integer = 0 Dim nTemp As Integer = 0
If Not IsNothing(ResetVariable.sValue) Then If Not IsNothing(ResetVariable.sValue) Then
@@ -433,7 +433,7 @@ Public Class MachManaging
Else Else
nCurrMachIndex = -1 nCurrMachIndex = -1
End If End If
'''EgtOutLog("Post scrittura variabili lette") 'EgtOutLog("Post scrittura variabili lette")
' se indice lavorazione positivo, lo aggiorno ' se indice lavorazione positivo, lo aggiorno
If nCurrMachIndex > 0 AndAlso nReset_State = 0 Then If nCurrMachIndex > 0 AndAlso nReset_State = 0 Then
m_nMachIndex = nCurrMachIndex m_nMachIndex = nCurrMachIndex
@@ -706,12 +706,12 @@ Public Class MachManaging
For VParIndex = 1 To sVs.Length - 1 For VParIndex = 1 To sVs.Length - 1
Dim VPar() As String = sVs(VParIndex).Split("="c) Dim VPar() As String = sVs(VParIndex).Split("="c)
VPar(1) = VPar(1).Trim VPar(1) = VPar(1).Trim
StringToDouble(VPar(1), dVPars(VParIndex)) StringToDouble(VPar(1), dVPars(VParIndex - 1))
Next Next
' li scrivo nel CN ' li scrivo nel CN
For Index As Integer = 1 To 10 For Index As Integer = 1 To 10
Dim sValue As String = "" Dim sValue As String = ""
DoubleToString(dVPars(Index), sValue) sValue = DoubleToString(dVPars(Index - 1), 2)
Tpa.RWVariableManager.WriteVarByName(VPAR & Index.ToString(), sValue) Tpa.RWVariableManager.WriteVarByName(VPAR & Index.ToString(), sValue)
Next Next
m_NextBarId = MyMachGroup.Id m_NextBarId = MyMachGroup.Id
@@ -1169,7 +1169,7 @@ Public Class MachManaging
EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, "", sVariable, IpFileName) EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, "", sVariable, IpFileName)
If String.IsNullOrWhiteSpace(sVariable) Then Return Nothing If String.IsNullOrWhiteSpace(sVariable) Then Return Nothing
Dim sVariableValues() As String = sVariable.Split(","c) Dim sVariableValues() As String = sVariable.Split(","c)
If Not sVariableValues.Count >= 4 Then Return Nothing 'If Not sVariableValues.Count >= 4 Then Return Nothing
For Index As Integer = 0 To sVariableValues.Count - 1 For Index As Integer = 0 To sVariableValues.Count - 1
sVariableValues(Index) = sVariableValues(Index).Trim() sVariableValues(Index) = sVariableValues(Index).Trim()
Next Next
@@ -1200,7 +1200,25 @@ Public Class MachManaging
Case S_OUTPUTVARIABLES Case S_OUTPUTVARIABLES
Paragraph = Paragraphs.OUTPUT Paragraph = Paragraphs.OUTPUT
End Select End Select
Return New CommVar(sVariableValues(0), sVariableValues(1), ReadType, Type, Paragraph) Dim sDescription As String = ""
If sVariableValues.Length >= 5 Then
Dim nDescription As Integer
If Integer.TryParse(sVariableValues(4), nDescription) Then
Dim MsgParagraph As MsgParagraphs
Select Case Paragraph
Case Paragraphs.INPUT
MsgParagraph = MsgParagraphs.INPUT
Case Paragraphs.OUTPUT
MsgParagraph = MsgParagraphs.OUTPUT
Case Else
MsgParagraph = MsgParagraphs.INPUT
End Select
sDescription = MachMsg(MsgParagraph, nDescription)
Else
sDescription = sVariableValues(4)
End If
End If
Return New CommVar(sVariableValues(0), sVariableValues(1), ReadType, Type, Paragraph, sDescription)
End Function End Function
Private Sub ReadPLCMessages() Private Sub ReadPLCMessages()
@@ -59,7 +59,7 @@ Public Class RWVariableManager
Public Shared Function InitVar(Name As String, Address As String, Type As CommVar.ReadTypes) As Integer Public Shared Function InitVar(Name As String, Address As String, Type As CommVar.ReadTypes) As Integer
Dim Index As Integer = Array.IndexOf(m_ReadingVars, Nothing) Dim Index As Integer = Array.IndexOf(m_ReadingVars, Nothing)
m_ReadingVars(Index) = New CommVar(Name, Address, Type, CommVar.Types.NULL, CommVar.Paragraphs.NULL) m_ReadingVars(Index) = New CommVar(Name, Address, Type, CommVar.Types.NULL, CommVar.Paragraphs.NULL, "")
Return Index Return Index
End Function End Function
@@ -101,7 +101,7 @@ Public Class RWVariableManager
Case S_OUTPUTVARIABLES Case S_OUTPUTVARIABLES
Paragraph = Paragraphs.OUTPUT Paragraph = Paragraphs.OUTPUT
End Select End Select
Return New CommVar(sVariableValues(0), sVariableValues(1), Type, CommVar.Types.NULL, Paragraph) Return New CommVar(sVariableValues(0), sVariableValues(1), Type, CommVar.Types.NULL, Paragraph, "")
End Function End Function
Public Sub RefreshVar(Name As String) Public Sub RefreshVar(Name As String)
@@ -266,6 +266,7 @@ Public Class CommVar
m_sName = value m_sName = value
End Set End Set
End Property End Property
Private m_sAddress As String Private m_sAddress As String
Public Property sAddress As String Public Property sAddress As String
Get Get
@@ -275,12 +276,14 @@ Public Class CommVar
m_sAddress = value m_sAddress = value
End Set End Set
End Property End Property
Private m_nReadType As ReadTypes Private m_nReadType As ReadTypes
Public ReadOnly Property nReadType As ReadTypes Public ReadOnly Property nReadType As ReadTypes
Get Get
Return m_nReadType Return m_nReadType
End Get End Get
End Property End Property
Private m_nType As Types Private m_nType As Types
Public ReadOnly Property nType As Types Public ReadOnly Property nType As Types
Get Get
@@ -306,6 +309,13 @@ Public Class CommVar
If bNewValue Then RaiseEvent NewValue(Me, New NewValueEventArgs(Value)) If bNewValue Then RaiseEvent NewValue(Me, New NewValueEventArgs(Value))
End Sub End Sub
Private m_sDescription As String
Public ReadOnly Property sDescription As String
Get
Return m_sDescription
End Get
End Property
Private m_bReaded As Boolean Private m_bReaded As Boolean
Public ReadOnly Property bReaded As Boolean Public ReadOnly Property bReaded As Boolean
Get Get
@@ -324,12 +334,13 @@ Public Class CommVar
' indice usato in liste lettura NUM ' indice usato in liste lettura NUM
Friend Index As Integer = -1 Friend Index As Integer = -1
Sub New(Name As String, Address As String, ReadType As ReadTypes, Type As Types, Paragraph As Paragraphs) Sub New(Name As String, Address As String, ReadType As ReadTypes, Type As Types, Paragraph As Paragraphs, sDescription As String)
m_sName = Name m_sName = Name
m_sAddress = Address m_sAddress = Address
m_nReadType = ReadType m_nReadType = ReadType
m_nType = Type m_nType = Type
m_Paragraph = Paragraph m_Paragraph = Paragraph
m_sDescription = sDescription
End Sub End Sub
Friend Sub ResetReading() Friend Sub ResetReading()
@@ -24,6 +24,26 @@
</Button> </Button>
</Grid> </Grid>
<StackPanel Orientation="Horizontal" Height="30">
<ComboBox ItemsSource="{Binding EntityTypeList}"
SelectedIndex="{Binding SelEntityType}"
Width="70"
Margin="0,0,2.5,0"
Style="{StaticResource PartParam_ComboBox}"/>
<ComboBox ItemsSource="{Binding PartEventTypeList}"
SelectedIndex="{Binding SelPartEventType}"
Width="70"
Margin="0,0,2.5,0"
Style="{StaticResource PartParam_ComboBox}"/>
<!--<TextBox Text="{Binding MaxRowNumber}"/>-->
<Button Grid.Column="1"
Command="{Binding Refresh_Command}"
Margin="2.5,0,5,0"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/MDIPage/Send.png" Stretch="Uniform"/>
</Button>
</StackPanel>
<EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding MachineLogList}" <EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding MachineLogList}"
Grid.Row="1" Grid.Row="1"
AutoGenerateColumns="False" AutoGenerateColumns="False"
@@ -37,7 +57,8 @@
BindingColumns="{Binding MachineLogColumns}"> BindingColumns="{Binding MachineLogColumns}">
<DataGrid.Resources> <DataGrid.Resources>
<!-- Data/ora --> <!-- Data/ora -->
<DataGridTextColumn x:Key="colDATETIME" Binding="{Binding sEventDateTime}"> <DataGridTextColumn x:Key="colDATETIME" Binding="{Binding sEventDateTime}"
SortMemberPath="sEventTick">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding Path=DataContext.EventDateTime_Msg, <TextBlock Text="{Binding Path=DataContext.EventDateTime_Msg,
@@ -61,7 +82,7 @@
<TextBlock Text="{Binding Path=DataContext.EventValue_Msg, <TextBlock Text="{Binding Path=DataContext.EventValue_Msg,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:MachineLogPageV}}}"/> RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:MachineLogPageV}}}"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn> </DataGridTextColumn>
<!-- SupervisorId --> <!-- SupervisorId -->
<DataGridTextColumn x:Key="colSUPERVISORID" Binding="{Binding SupervisorId}"> <DataGridTextColumn x:Key="colSUPERVISORID" Binding="{Binding SupervisorId}">
@@ -91,7 +112,7 @@
<DataGridTextColumn x:Key="colPART" Binding="{Binding PartId}"> <DataGridTextColumn x:Key="colPART" Binding="{Binding PartId}">
<DataGridTextColumn.HeaderTemplate> <DataGridTextColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding Path=DataContext.PartId_Msg, <TextBlock Text="{Binding Path=DataContext.PartId_Msg,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:MachineLogPageV}}}"/> RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:MachineLogPageV}}}"/>
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
@@ -62,6 +62,42 @@ Public Class MachineLogPageVM
End Set End Set
End Property End Property
Private m_PartEventTypeList As New List(Of String)({"", "Inizio", "Fine"})
Public ReadOnly Property PartEventTypeList As List(Of String)
Get
Return m_PartEventTypeList
End Get
End Property
Private m_SelPartEventType As Integer
Public Property SelPartEventType As Integer
Get
Return m_SelPartEventType
End Get
Set(value As Integer)
m_SelPartEventType = value
m_MachineLogList_View.Refresh()
End Set
End Property
Private m_EntityTypeList As New List(Of String)({"", "Pezzo", "Barra"})
Public ReadOnly Property EntityTypeList As List(Of String)
Get
Return m_EntityTypeList
End Get
End Property
Private m_SelEntityType As Integer
Public Property SelEntityType As Integer
Get
Return m_SelEntityType
End Get
Set(value As Integer)
m_SelEntityType = value
m_MachineLogList_View.Refresh()
End Set
End Property
' Definizione comandi ' Definizione comandi
Private m_cmdRefresh As ICommand Private m_cmdRefresh As ICommand
@@ -139,16 +175,34 @@ Public Class MachineLogPageVM
Private Function MachineLogFilter(LogEvent As Object) As Boolean Private Function MachineLogFilter(LogEvent As Object) As Boolean
Dim CurrLogEvent As LogEvent = DirectCast(LogEvent, LogEvent) Dim CurrLogEvent As LogEvent = DirectCast(LogEvent, LogEvent)
Dim bOk As Boolean = True
Select Case m_SelEntityType
Case 0
bOk = bOk And True
Case 1
bOk = bOk And CurrLogEvent.EventType = MachLogTypes.PART_STATUS
Case 2
bOk = bOk And CurrLogEvent.EventType = MachLogTypes.MACHGROUP_STATUS
End Select
If CurrLogEvent.EventType = MachLogTypes.PART_STATUS OrElse CurrLogEvent.EventType = MachLogTypes.MACHGROUP_STATUS Then
Select Case m_SelPartEventType
Case 0
bOk = bOk And True
Case 1
bOk = bOk And CurrLogEvent.nStatus = 1
Case 2
bOk = bOk And CurrLogEvent.nStatus = 2
End Select
End If
' se livello utente inferiore a 5, mostro solo eventi pezzo e machgroup ' se livello utente inferiore a 5, mostro solo eventi pezzo e machgroup
If Map.refMainWindowVM.MainWindowM.nUserLevel < 5 Then If Map.refMainWindowVM.MainWindowM.nUserLevel < 5 Then
If CurrLogEvent.EventType = MachLogTypes.PART_STATUS Then bOk = bOk And CurrLogEvent.EventType = MachLogTypes.PART_STATUS OrElse CurrLogEvent.EventType = MachLogTypes.MACHGROUP_STATUS
Return True
Else
Return False
End If
Else Else
Return True If Not CurrLogEvent.EventType = MachLogTypes.PART_STATUS AndAlso Not CurrLogEvent.EventType = MachLogTypes.MACHGROUP_STATUS Then
bOk = True
End If
End If End If
Return bOk
End Function End Function
Friend Sub LoadMachineLogList() Friend Sub LoadMachineLogList()
@@ -157,6 +211,12 @@ Public Class MachineLogPageVM
m_colMachineLog_Description.ColumnVisibility = Visibility.Collapsed m_colMachineLog_Description.ColumnVisibility = Visibility.Collapsed
m_colMachineLog_SupervisorId.ColumnVisibility = Visibility.Collapsed m_colMachineLog_SupervisorId.ColumnVisibility = Visibility.Collapsed
End If End If
UpdateMachineLogList()
m_MachineLogList_View = CollectionViewSource.GetDefaultView(m_MachineLogList)
m_MachineLogList_View.Filter = AddressOf MachineLogFilter
End Sub
Friend Sub UpdateMachineLogList()
m_MachineLogList = New ObservableCollection(Of LogEvent)(DbControllers.m_LogMachineController.GetCoreDesc(DateTime.Now - TimeSpan.FromDays(300), DateTime.Now).Select(Of LogEvent)(Function(x) New LogEvent(x)).ToList()) m_MachineLogList = New ObservableCollection(Of LogEvent)(DbControllers.m_LogMachineController.GetCoreDesc(DateTime.Now - TimeSpan.FromDays(300), DateTime.Now).Select(Of LogEvent)(Function(x) New LogEvent(x)).ToList())
NotifyPropertyChanged(NameOf(MachineLogList)) NotifyPropertyChanged(NameOf(MachineLogList))
m_MachineLogList_View = CollectionViewSource.GetDefaultView(m_MachineLogList) m_MachineLogList_View = CollectionViewSource.GetDefaultView(m_MachineLogList)
@@ -185,7 +245,7 @@ Public Class MachineLogPageVM
''' Execute the Open. This method is invoked by the OpenCommand. ''' Execute the Open. This method is invoked by the OpenCommand.
''' </summary> ''' </summary>
Friend Sub Refresh() Friend Sub Refresh()
m_MachineLogList_View.Refresh() UpdateMachineLogList()
End Sub End Sub
#End Region ' Refresh #End Region ' Refresh
@@ -195,6 +255,7 @@ Public Class MachineLogPageVM
End Class End Class
Public Class MachLogType Public Class MachLogType
Inherits VMBase
Private m_nId As Integer Private m_nId As Integer
Public ReadOnly Property nId As Integer Public ReadOnly Property nId As Integer
@@ -3,6 +3,7 @@ Imports System.Math
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgtBEAMWALL.Core Imports EgtBEAMWALL.Core
Imports System.IO
Public Class MainWindowM Public Class MainWindowM
@@ -18,6 +19,13 @@ Public Class MainWindowM
End Get End Get
End Property End Property
Private m_sDataDir As String = String.Empty
Friend ReadOnly Property sDataDir As String
Get
Return m_sDataDir
End Get
End Property
Private m_sConfigDir As String = String.Empty Private m_sConfigDir As String = String.Empty
Public ReadOnly Property sConfigDir As String Public ReadOnly Property sConfigDir As String
Get Get
@@ -190,6 +198,8 @@ Public Class MainWindowM
IniFile.m_sIniFile = m_sConfigDir & "\" & Core.ConstIni.INI_FILE_NAME IniFile.m_sIniFile = m_sConfigDir & "\" & Core.ConstIni.INI_FILE_NAME
' Impostazione path BTL Ini File ' Impostazione path BTL Ini File
BTLIniFile.m_sBTLIniFile = m_sConfigDir & "\" & BTLFEATURES_FILE_NAME BTLIniFile.m_sBTLIniFile = m_sConfigDir & "\" & BTLFEATURES_FILE_NAME
' Impostazione path Ini file DataGrid
DataGridColumnsIniFile.m_sDataGridColumnsIniFile = m_sConfigDir & "\" & DATAGRIDCOLUMNS_FILE_NAME
' Impostazione path Ini file Dimensioni ' Impostazione path Ini file Dimensioni
DimensionsIniFile.m_sDimensionsIniFile = m_sConfigDir & "\" & ConstDims.DIMENSIONS_FILE_NAME DimensionsIniFile.m_sDimensionsIniFile = m_sConfigDir & "\" & ConstDims.DIMENSIONS_FILE_NAME
' Impostazione path resources dir ' Impostazione path resources dir
@@ -209,13 +219,10 @@ Public Class MainWindowM
If GetMainPrivateProfileString(S_WALL, K_WALLBASEDIR, "", m_sWallRoot) = 0 Then If GetMainPrivateProfileString(S_WALL, K_WALLBASEDIR, "", m_sWallRoot) = 0 Then
m_sWallRoot = m_sDataRoot & "\" & WALL_DIR m_sWallRoot = m_sDataRoot & "\" & WALL_DIR
End If End If
m_sProjsDir = m_sDataRoot & "\" & PROJS_DIR ' Impostazione direttorio magazzino grezzi
m_sProdsDir = m_sDataRoot & "\" & PRODS_DIR If GetMainPrivateProfileString(S_GENERAL, K_DATADIR, "", m_sDataDir) = 0 Then
m_sWarehouseRoot = m_sDataRoot & "\" & WAREHOUSE_DIR m_sDataDir = m_sDataRoot
' imposto cartelle dei progetti End If
ProjectFileVM.Init(sProjsDir, sProdsDir)
' Impostazione path Ini file DataGrid
Core.DataGridColumnsIniFile.m_sDataGridColumnsIniFile = m_sConfigDir & "\" & DATAGRIDCOLUMNS_FILE_NAME
' Verifico indice di istanza ' Verifico indice di istanza
ManageInstance() ManageInstance()
' Imposto tipo di chiave ' Imposto tipo di chiave
@@ -233,8 +240,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico ' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey) m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2407, 1, m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(5327, 2411, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2407, 1, m_nKeyOptions) EgtGetKeyOptions(5327, 2411, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
@@ -387,6 +394,30 @@ Public Class MainWindowM
Core.ProjectFileVM.Init(sProjsDir, sProdsDir) Core.ProjectFileVM.Init(sProjsDir, sProdsDir)
End Sub End Sub
Friend Sub UpdatePathForKey(sKey As String)
m_sProjsDir = m_sDataDir & "\" & sKey & "\" & PROJS_DIR
m_sProdsDir = m_sDataDir & "\" & sKey & "\" & PRODS_DIR
If Not Directory.Exists(m_sDataDir & "\" & sKey) Then
Directory.CreateDirectory(m_sDataDir & "\" & sKey & "\" & PROJS_DIR)
Directory.CreateDirectory(m_sDataDir & "\" & sKey & "\" & PRODS_DIR)
End If
' imposto cartelle dei progetti
Core.ProjectFileVM.Init(sProjsDir, sProdsDir)
End Sub
Friend Function GetKeyNumber() As Integer
Dim sKey As String = ""
Dim nKey As Integer = 0
EgtGetKeyInfo(sKey)
sKey = sKey.Replace(" ", "")
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
If Integer.TryParse(sKey.Substring(3, 6), nKey) AndAlso nKey > 0 Then
Return nKey
End If
End If
Return -1
End Function
Friend Sub Close() Friend Sub Close()
' Terminazione generale di EgtInterface ' Terminazione generale di EgtInterface
EgtExit() EgtExit()
@@ -11,8 +11,23 @@ Imports System.Windows
' Review the values of the assembly attributes ' Review the values of the assembly attributes
<Assembly: AssemblyTitle("EgtBEAMWALL.Supervisor")> #If PLATFORM = "x64" Then
<Assembly: AssemblyDescription("")> #If DEBUG Then
<Assembly: AssemblyTitle("EgtBEAMWALL.SupervisorD64.exe")>
<Assembly: AssemblyDescription("EgtBEAMWALL S Debug 32 bit")>
#Else
<Assembly: AssemblyTitle("EgtBEAMWALL.SupervisorR64.exe")>
<Assembly: AssemblyDescription("EgtBEAMWALL S 32 bit")>
#End if
#Else
#If DEBUG Then
<Assembly: AssemblyTitle("EgtBEAMWALL.SupervisorD32.exe")>
<Assembly: AssemblyDescription("EgtBEAMWALL S Debug 32 bit")>
#Else
<Assembly: AssemblyTitle("EgtBEAMWALL.SupervisorR32.exe")>
<Assembly: AssemblyDescription("EgtBEAMWALL S 32 bit")>
#End if
#End if
<Assembly: AssemblyCompany("Egalware s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("EgtBEAMWALL.Supervisor")> <Assembly: AssemblyProduct("EgtBEAMWALL.Supervisor")>
<Assembly: AssemblyCopyright("Copyright © 2020-2022 by Egalware s.r.l.")> <Assembly: AssemblyCopyright("Copyright © 2020-2022 by Egalware s.r.l.")>
@@ -55,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.7.1")> <Assembly: AssemblyVersion("2.4.11.3")>
<Assembly: AssemblyFileVersion("2.4.7.1")> <Assembly: AssemblyFileVersion("2.4.11.3")>
+1 -1
View File
@@ -28,7 +28,7 @@ Public Class ProjectVM
If m_SelTabPage = TabPages.MACHINELOG Then If m_SelTabPage = TabPages.MACHINELOG Then
Map.refCALCPanelVM.SetMachineLog(False) Map.refCALCPanelVM.SetMachineLog(False)
End If End If
If SelTabPage Then If SelTabPage = TabPages.MACHINELOG Then
Map.refMachineLogPageVM.LoadMachineLogList() Map.refMachineLogPageVM.LoadMachineLogList()
End If End If
m_SelTabPage = SelTabPage m_SelTabPage = SelTabPage
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

@@ -77,21 +77,21 @@ Public Class SupervisorManagerVM
'Private m_cmdSave As ICommand 'Private m_cmdSave As ICommand
Private m_cmdGoToProd As ICommand Private m_cmdGoToProd As ICommand
'#Region "ToolTip" #Region "ToolTip"
' 'Proprietà ToolTip 'Proprietà ToolTip
' Public ReadOnly Property OpenToolTip As String Public ReadOnly Property OpenToolTip As String
' Get Get
' Return EgtMsg(MSG_TOPCOMMANDBAR + 2) Return EgtMsg(MSG_TOPCOMMANDBAR + 2)
' End Get End Get
' End Property End Property
' Public ReadOnly Property SaveToolTip As String Public ReadOnly Property GoToProd_ToolTip As String
' Get Get
' Return EgtMsg(MSG_TOPCOMMANDBAR + 3) Return EgtMsg(61835)
' End Get End Get
' End Property End Property
'#End Region ' ToolTip #End Region ' ToolTip
#End Region ' Fields & Properties #End Region ' Fields & Properties
@@ -219,6 +219,8 @@ Public Class SupervisorManagerVM
CurrProd = Nothing CurrProd = Nothing
Map.refMainWindowVM.UpdateTitle() Map.refMainWindowVM.UpdateTitle()
m_bLoadingProd = False m_bLoadingProd = False
NotifyPropertyChanged(NameOf(MruFileNames))
LoadingWndHelper.CloseLoadingWnd(ActiveIds.OPENPROD)
Return Return
End If End If
LoadingWndHelper.OpenLoadingWnd(ActiveIds.OPENPROD, 3, EgtMsg(63000), EgtMsg(63001), 50) 'Project opening 'Loading project geometries LoadingWndHelper.OpenLoadingWnd(ActiveIds.OPENPROD, 3, EgtMsg(63000), EgtMsg(63001), 50) 'Project opening 'Loading project geometries
@@ -239,11 +241,19 @@ Public Class SupervisorManagerVM
MessageBox.Show("Impossibile aprire il file!!") MessageBox.Show("Impossibile aprire il file!!")
Map.refSceneHostVM.MainController.NewProject() Map.refSceneHostVM.MainController.NewProject()
Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL") Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL")
m_bLoadingProd = False
NotifyPropertyChanged(NameOf(MruFileNames))
LoadingWndHelper.CloseLoadingWnd(ActiveIds.OPENPROD)
Return
End If End If
Else Else
MessageBox.Show("File non trovato!!") MessageBox.Show("File non trovato!!")
Map.refSceneHostVM.MainController.NewProject() Map.refSceneHostVM.MainController.NewProject()
Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL") Map.refMainWindowVM.SetTitle("New - EgtBEAMWALL")
m_bLoadingProd = False
NotifyPropertyChanged(NameOf(MruFileNames))
LoadingWndHelper.CloseLoadingWnd(ActiveIds.OPENPROD)
Return
End If End If
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.OPENPROD, 3, EgtMsg(63004), 70, 100) ' Loading production data LoadingWndHelper.UpdateLoadingWnd(ActiveIds.OPENPROD, 3, EgtMsg(63004), 70, 100) ' Loading production data
Map.refProjectVM.SupervisorMachGroupPanelVM = New SupervisorMachGroupPanelVM(MachGroupPanelM.CreateNewMachGroupPanel()) Map.refProjectVM.SupervisorMachGroupPanelVM = New SupervisorMachGroupPanelVM(MachGroupPanelM.CreateNewMachGroupPanel())
@@ -16,6 +16,8 @@ Public Module CurrentMachine
MDI = 1 MDI = 1
PLC = 2 PLC = 2
CNC = 3 CNC = 3
INPUT = 4
OUTPUT = 5
End Enum End Enum
' Nome macchina corrente ' Nome macchina corrente
@@ -305,6 +307,10 @@ Public Module CurrentMachine
sPar = PLC_MSG sPar = PLC_MSG
Case MsgParagraphs.CNC Case MsgParagraphs.CNC
sPar = CNC_MSG sPar = CNC_MSG
Case MsgParagraphs.INPUT
sPar = INPUT_MSG
Case MsgParagraphs.OUTPUT
sPar = OUTPUT_MSG
End Select End Select
EgtGetStringUtf8FromIni(sPar, nId, nId, sMsg, m_sMachMessagesFile) EgtGetStringUtf8FromIni(sPar, nId, nId, sMsg, m_sMachMessagesFile)
Return sMsg Return sMsg
+83 -65
View File
@@ -4,81 +4,99 @@ Imports EgtBEAMWALL.Core
Module DbControllers Module DbControllers
Friend m_SupervisorId As String = "1" Friend m_SupervisorId As String = "1"
Public ReadOnly Property SupervisorId As String Public ReadOnly Property SupervisorId As String
Get Get
Return m_SupervisorId Return m_SupervisorId
End Get End Get
End Property End Property
Public m_ProjController As DataLayer.Controllers.ProjController Private m_bNetwork As Boolean = False
Public m_ProdController As DataLayer.Controllers.ProdController Friend ReadOnly Property bNetwork As Boolean
Public m_MachGroupController As DataLayer.Controllers.MachGroupController Get
Public m_PartController As DataLayer.Controllers.PartController Return m_bNetwork
Public m_LogMachineController As DataLayer.Controllers.LogMachineController End Get
Public m_StatusMapController As DataLayer.Controllers.StatusMapController End Property
Sub New() Public m_ProjController As DataLayer.Controllers.ProjController
Public m_ProdController As DataLayer.Controllers.ProdController
Public m_MachGroupController As DataLayer.Controllers.MachGroupController
Public m_PartController As DataLayer.Controllers.PartController
Public m_LogMachineController As DataLayer.Controllers.LogMachineController
Public m_StatusMapController As DataLayer.Controllers.StatusMapController
' se demo--> server = db.steamware.net, nKey e sKey come le hai... Sub New()
Dim sKey = "", sUser = "", sPwd = "" ' se demo--> server = db.steamware.net, nKey e sKey come le hai...
EgtGetKeyInfo(sKey) Dim sKey = "", sUser = "", sPwd = ""
sKey = sKey.Replace(" ", "")
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then EgtGetKeyInfo(sKey)
sUser = sKey.Substring(3, 6) sKey = sKey.Replace(" ", "")
sPwd = sKey.Substring(10, sKey.Length - 10).Replace("(", "").Replace(")", "") If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
End If sUser = sKey.Substring(3, 6)
Try sPwd = sKey.Substring(10, sKey.Length - 10).Replace("(", "").Replace(")", "")
Dim DbAddress As String = "127.0.0.1" End If
Dim DbMasterKey As Integer = 0 Try
Dim sDbMasterKey As String = "" Dim DbAddress As String = "127.0.0.1"
Dim sSharedFolder As String = "" Dim DbMasterKey As Integer = 0
Dim bNetwork As Boolean = False Dim sDbMasterKey As String = ""
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then Dim sSharedFolder As String = ""
GetMainPrivateProfileString(S_GENERAL, K_DBADDRESS, "", DbAddress) If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0) GetMainPrivateProfileString(S_GENERAL, K_DBADDRESS, "", DbAddress)
If DbMasterKey > 0 Then DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
sDbMasterKey = DbMasterKey.ToString("000000") If DbMasterKey > 0 Then
End If sDbMasterKey = DbMasterKey.ToString("000000")
If String.IsNullOrWhiteSpace(DbAddress) OrElse DbMasterKey <= 0 Then
DbAddress = "127.0.0.1"
DbMasterKey = 0
Else
bNetwork = True
End If
End If End If
DataLayer.DbConfig.InitDb(DbAddress, sUser, sPwd, sDbMasterKey) If String.IsNullOrWhiteSpace(DbAddress) OrElse DbMasterKey <= 0 Then
DataLayer.DbConfig.SetupLogDir(Map.refMainWindowVM.MainWindowM.sTempDir) DbAddress = "127.0.0.1"
DataLayer.DbConfig.CheckMigrateDb() DbMasterKey = 0
DataLayer.DbConfig.CheckUser(sUser, sPwd, Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK)) Else
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) And bNetwork Then m_bNetwork = True
' imposto cartella condivisa
GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataRoot, sSharedFolder)
Map.refMainWindowVM.MainWindowM.UpdatePathForNetwork(sSharedFolder)
Dim sSupervisorMachName As String = ""
GetMainPrivateProfileString(S_MACH, K_SUPERVISORMACH, "", sSupervisorMachName)
If Not String.IsNullOrWhiteSpace(sSupervisorMachName) Then m_SupervisorId = sSupervisorMachName
End If End If
Catch ex As Exception End If
EgtOutLog("InitDb error: " & ex.ToString()) If Not m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
MessageBox.Show(Application.Current.MainWindow, "Db connection error!!", "Error") DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
End If DbMasterKey > 0 Then
End Try sDbMasterKey = DbMasterKey.ToString("000000")
End If
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then ElseIf GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0) = 0 Then
Dim nKey As Integer = 0
If Integer.TryParse(sKey.Substring(3, 6), nKey) AndAlso nKey > 0 Then
WriteMainPrivateProfileString(S_GENERAL, K_DBMASTERKEY, nKey)
End If
End If
DataLayer.DbConfig.InitDb(DbAddress, sUser, sPwd, sDbMasterKey)
DataLayer.DbConfig.SetupLogDir(Map.refMainWindowVM.MainWindowM.sTempDir)
DataLayer.DbConfig.CheckMigrateDb()
DataLayer.DbConfig.CheckUser(sUser, sPwd, m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK))
DataLayer.DbConfig.CheckViews(sUser, sPwd)
If m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
' imposto cartella condivisa
GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataRoot, sSharedFolder)
Map.refMainWindowVM.MainWindowM.UpdatePathForNetwork(sSharedFolder)
Dim sSupervisorMachName As String = "" Dim sSupervisorMachName As String = ""
GetMainPrivateProfileString(S_MACH, K_SUPERVISORMACH, "", sSupervisorMachName) GetMainPrivateProfileString(S_MACH, K_SUPERVISORMACH, "", sSupervisorMachName)
If Not String.IsNullOrWhiteSpace(sSupervisorMachName) Then m_SupervisorId = sSupervisorMachName If Not String.IsNullOrWhiteSpace(sSupervisorMachName) Then m_SupervisorId = sSupervisorMachName
End If ElseIf Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
' imposto cartella chiave master
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sDbMasterKey)
Else
' imposto cartella chiave locale
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sKey.Substring(3, 6))
End If
Catch ex As Exception
EgtOutLog("InitDb error: " & ex.ToString())
MessageBox.Show(Application.Current.MainWindow, "Db connection error!!", "Error")
End
End Try
m_ProjController = New DataLayer.Controllers.ProjController m_ProjController = New DataLayer.Controllers.ProjController
m_ProdController = New DataLayer.Controllers.ProdController m_ProdController = New DataLayer.Controllers.ProdController
m_MachGroupController = New DataLayer.Controllers.MachGroupController m_MachGroupController = New DataLayer.Controllers.MachGroupController
m_PartController = New DataLayer.Controllers.PartController m_PartController = New DataLayer.Controllers.PartController
m_LogMachineController = New DataLayer.Controllers.LogMachineController m_LogMachineController = New DataLayer.Controllers.LogMachineController
m_StatusMapController = New DataLayer.Controllers.StatusMapController m_StatusMapController = New DataLayer.Controllers.StatusMapController
End Sub End Sub
End Module End Module
+39 -7
View File
@@ -4,13 +4,7 @@ Imports EgtBEAMWALL.Core
Public Class LogEvent Public Class LogEvent
Inherits VMBase Inherits VMBase
Public ReadOnly Property MachGroupId_Msg As String Public Const cSeparator As Char = ";"c
Get
Return "MachGroup"
End Get
End Property
Const cSeparator As Char = ";"c
Public Enum MachLogTypes Public Enum MachLogTypes
PART_STATUS = 1 PART_STATUS = 1
@@ -25,6 +19,12 @@ Public Class LogEvent
PROGRAM_SEND = 10 PROGRAM_SEND = 10
End Enum End Enum
Public Enum MachineCommands As Integer
CONNECTION = 1
DISCONNECTION = 2
PROGRAM_ACTIVATION = 3
End Enum
Private m_EventDateTime As DateTime Private m_EventDateTime As DateTime
Public ReadOnly Property EventDateTime As DateTime Public ReadOnly Property EventDateTime As DateTime
Get Get
@@ -68,6 +68,11 @@ Public Class LogEvent
End Get End Get
End Property End Property
Private m_Status As Integer Private m_Status As Integer
Public ReadOnly Property nStatus As Integer
Get
Return m_Status
End Get
End Property
Public ReadOnly Property Status As String Public ReadOnly Property Status As String
Get Get
Select Case m_Status Select Case m_Status
@@ -119,6 +124,11 @@ Public Class LogEvent
Return m_Value Return m_Value
End Get End Get
End Property End Property
Public ReadOnly Property sEventTick As Double
Get
Return m_EventDateTime.Ticks
End Get
End Property
Public ReadOnly Property sPROD As String Public ReadOnly Property sPROD As String
Get Get
@@ -144,6 +154,8 @@ Public Class LogEvent
m_ProdId = sValues(0) m_ProdId = sValues(0)
m_MachGroupId = DbControllers.m_MachGroupController.FindByMachGroupId(m_ProdId, sValues(1)).Name m_MachGroupId = DbControllers.m_MachGroupController.FindByMachGroupId(m_ProdId, sValues(1)).Name
m_Status = sValues(2) m_Status = sValues(2)
Case MachLogTypes.MACHINE_COMMAND
End Select End Select
End If End If
End Sub End Sub
@@ -168,4 +180,24 @@ Public Class LogEvent
Return CreateMachLog(MachLogTypes.MACHGROUP_STATUS, dtEvent, Prod & cSeparator & MachGroup & cSeparator & State, SupervisorID) Return CreateMachLog(MachLogTypes.MACHGROUP_STATUS, dtEvent, Prod & cSeparator & MachGroup & cSeparator & State, SupervisorID)
End Function End Function
Public Shared Function CreateMachCommandLog(Command As MachineCommands, sProgramId As String, nError As Integer, SupervisorID As String)
Return CreateMachLog(MachLogTypes.MACHINE_COMMAND, DateTime.Now(), Command & cSeparator & sProgramId & cSeparator & nError, SupervisorID)
End Function
Public Shared Function CreateAlarmLog(dtEvent As DateTime, Alarm As String, SupervisorID As String)
Return CreateMachLog(MachLogTypes.ALARM, dtEvent, Alarm, SupervisorID)
End Function
Public Shared Function CreateMachineModeLog(MachineMode As Integer, SupervisorID As String)
Return CreateMachLog(MachLogTypes.MACHINE_MODE, DateTime.Now(), MachineMode, SupervisorID)
End Function
Public Shared Function CreateMachineStateLog(MachineStatus As Integer, SupervisorID As String)
Return CreateMachLog(MachLogTypes.MACHINE_STATUS, DateTime.Now(), MachineStatus, SupervisorID)
End Function
Public Shared Function CreateReadVarLog(VarAddress As String, VarValue As String, SupervisorID As String)
Return CreateMachLog(MachLogTypes.READ_VAR, DateTime.Now(), VarAddress & cSeparator & VarValue, SupervisorID)
End Function
End Class End Class
@@ -5,7 +5,7 @@
<DataGrid ItemsSource="{Binding VariablesList}" <DataGrid ItemsSource="{Binding VariablesList}"
AutoGenerateColumns="False"> AutoGenerateColumns="False">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="Name" Binding="{Binding sName}" Width="1*"/> <DataGridTextColumn Header="Name" Binding="{Binding sDescription}" Width="1*"/>
<DataGridTextColumn Header="Address" Binding="{Binding sAddress}" Width="1*"/> <DataGridTextColumn Header="Address" Binding="{Binding sAddress}" Width="1*"/>
<DataGridTextColumn Header="Value" Binding="{Binding sValue}" Width="1*"/> <DataGridTextColumn Header="Value" Binding="{Binding sValue}" Width="1*"/>
</DataGrid.Columns> </DataGrid.Columns>
@@ -44,6 +44,12 @@ Public Class Variable
End Set End Set
End Property End Property
Public ReadOnly Property sDescription As String
Get
Return CommVar.sDescription
End Get
End Property
Public Property sAddress As String Public Property sAddress As String
Get Get
Return CommVar.sAddress Return CommVar.sAddress
+2 -2
View File
@@ -19,7 +19,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" /> <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.29.0" newVersion="8.0.29.0" /> <bindingRedirect oldVersion="0.0.0.0-8.0.21.0" newVersion="8.0.21.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
@@ -46,7 +46,7 @@
<system.data> <system.data>
<DbProviderFactories> <DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" /> <remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.29.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.21.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories> </DbProviderFactories>
</system.data> </system.data>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>
+79
View File
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config.
Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
@@ -43,7 +43,7 @@
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch" <TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/> VerticalAlignment="Stretch" FontSize="12" IsReadOnly="True" TextWrapping="Wrap"/>
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True" <Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
Margin="100,0"/> Margin="100,0"/>
</Grid> </Grid>
@@ -1,9 +1,9 @@
Imports EgtUILib Imports EgtUILib
Imports EgtBEAMWALL.Core
Public Class AboutBoxV Public Class AboutBoxV
Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub AboutBoxWD_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
Me.Owner = Application.Current.MainWindow
DescriptionLbl.Text = My.Application.Info.Description.ToString() DescriptionLbl.Text = My.Application.Info.Description.ToString()
VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() & VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() &
"." & My.Application.Info.Version.Minor.ToString() & "." & My.Application.Info.Version.Minor.ToString() &
@@ -24,6 +24,9 @@ Public Class AboutBoxV
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & 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 Dim sCPU As String = String.Empty
EgtGetCpuInfo( sCPU) EgtGetCpuInfo( sCPU)
sInfo &= sCPU & Environment.NewLine sInfo &= sCPU & Environment.NewLine
@@ -132,7 +132,7 @@ Public Class AddSectionXMaterialWndVM
' carico le colonne della datagrid ' carico le colonne della datagrid
LoadColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE) LoadColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
NewSectionXMaterialList = New ObservableCollection(Of SectionXMaterialToBeAdded)(SectXMatList) NewSectionXMaterialList = New ObservableCollection(Of SectionXMaterialToBeAdded)(SectXMatList)
WhSectXMatList = Map.refWarehouseWndVM.GetSectionXMaterialsFromWarehouse() WhSectXMatList = WarehouseWndVM.GetSectionXMaterialsFromWarehouse()
' Prendo i SectionXMaterial appena messi nella Lista di questa finestra e li confronto con ciascuno di quelli presenti in Warehouse. ' Prendo i SectionXMaterial appena messi nella Lista di questa finestra e li confronto con ciascuno di quelli presenti in Warehouse.
' Se le sezioni sono uguali carico i materiali relativi alla medesima sezione. ' Se le sezioni sono uguali carico i materiali relativi alla medesima sezione.
' Se i materiali di quella medesima sezione non ci sono disabilito la CheckBox Alias. ' Se i materiali di quella medesima sezione non ci sono disabilito la CheckBox Alias.
+4 -5
View File
@@ -7,10 +7,9 @@
<entityFramework> <entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" /> <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers> <providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.21.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.21.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</provider></providers> </providers>
</entityFramework> </entityFramework>
<connectionStrings> <connectionStrings>
<add name="DefaultConnection" connectionString="server=localhost;port=3306;User Id=EgtUser;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none" providerName="MySql.Data.MySqlClient" /> <add name="DefaultConnection" connectionString="server=localhost;port=3306;User Id=EgtUser;password=viacremasca;Persist Security Info=True;database=EgtBwDb;SslMode=none" providerName="MySql.Data.MySqlClient" />
@@ -19,7 +18,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" /> <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.29.0" newVersion="8.0.29.0" /> <bindingRedirect oldVersion="0.0.0.0-8.0.21.0" newVersion="8.0.21.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
@@ -42,7 +41,7 @@
<system.data> <system.data>
<DbProviderFactories> <DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" /> <remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.29.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.21.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories> </DbProviderFactories>
</system.data> </system.data>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>
@@ -40,7 +40,6 @@ Public Class BTLFeatureVM
' rendo non calcolata questa feature ' rendo non calcolata questa feature
ResetCalcFeature() ResetCalcFeature()
End If End If
NotifyPropertyChanged("nSelGRP")
NotifyPropertyChanged(NameOf(nSelGRP)) NotifyPropertyChanged(NameOf(nSelGRP))
EgtDraw() EgtDraw()
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False) If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(False)
@@ -214,7 +213,7 @@ Public Class BTLFeatureVM
m_SelQParam = value m_SelQParam = value
If Not IsNothing(m_SelQParam) Then If Not IsNothing(m_SelQParam) Then
' imposto path disegno da mostrare in BottomPanel ' imposto path disegno da mostrare in BottomPanel
Map.refBottomPanelVM.SetCurrDraw(sDrawPath) Map.refBottomPanelVM.SetCurrDraw(m_SelQParam.sDrawPath)
End If End If
NotifyPropertyChanged(NameOf(SelQBTLParam)) NotifyPropertyChanged(NameOf(SelQBTLParam))
End Set End Set
@@ -222,7 +221,7 @@ Public Class BTLFeatureVM
Public ReadOnly Property Edit_Visibility As Visibility Public ReadOnly Property Edit_Visibility As Visibility
Get Get
Return If(Map.refMainWindowVM.MainWindowM.nUserLevel > 5 AndAlso BTLFeatureM.IsFreeContour AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed) Return If(BTLFeatureM.IsFreeContour AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
End Get End Get
End Property End Property
Public ReadOnly Property SaveCancel_Visibility As Visibility Public ReadOnly Property SaveCancel_Visibility As Visibility
@@ -1629,9 +1629,9 @@ Public Class BTLPartVM
AddHandler m_BTLFeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged AddHandler m_BTLFeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged
End Sub End Sub
Public Sub Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional dAng As Double = 90, Optional bVerifyDuplo As Boolean = True) Public Sub Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional bRedraw As Boolean = True, Optional dAng As Double = 90, Optional bVerifyDuplo As Boolean = True)
Dim OldSection As SectionXMaterial = Section Dim OldSection As SectionXMaterial = Section
If m_BTLPartM.Rotation(IsPositive, SelectedMachineType, dAng) Then If m_BTLPartM.Rotation(IsPositive, SelectedMachineType, bRedraw, dAng) Then
' aggiorno visualizzazione dimensioni ' aggiorno visualizzazione dimensioni
NotifyPropertyChanged(NameOf(sW)) NotifyPropertyChanged(NameOf(sW))
NotifyPropertyChanged(NameOf(sH)) NotifyPropertyChanged(NameOf(sH))
@@ -1985,11 +1985,11 @@ Public Class BTLPartVM
BackRotation(True) BackRotation(True)
End Sub End Sub
Public Sub BackRotation(Optional bUpdateSection As Boolean = False) Public Sub BackRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True)
' salvo sezione impostata ' salvo sezione impostata
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
' ruoto ' ruoto
Rotation(False, Map.refProjectVM.BTLStructureVM.nPROJTYPE) Rotation(False, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw)
' imposto lock ' imposto lock
bLockRotation = True bLockRotation = True
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi) ' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
@@ -2017,10 +2017,10 @@ Public Class BTLPartVM
ForwardRotation(True) ForwardRotation(True)
End Sub End Sub
Public Sub ForwardRotation(Optional bUpdateSection As Boolean = False) Public Sub ForwardRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True)
' salvo sezione impostata ' salvo sezione impostata
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE) Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw)
' imposto lock ' imposto lock
bLockRotation = True bLockRotation = True
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi) ' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
@@ -2160,6 +2160,9 @@ Public Class BTLPartVM
Select Case e.PropertyName Select Case e.PropertyName
Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE) Case NameOf(sender.nSelGRP), NameOf(sender.nSelSIDE)
CalcGlobalUpdate(True) CalcGlobalUpdate(True)
' imposto path disegno da mostrare in BottomPanel
Dim SelPBTLParam As BTLParamVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam
If Not IsNothing(SelPBTLParam) Then Map.refBottomPanelVM.SetCurrDraw(SelPBTLParam.sDrawPath)
Case NameOf(sender.bDO) Case NameOf(sender.bDO)
NotifyPropertyChanged(NameOf(bDOALL)) NotifyPropertyChanged(NameOf(bDOALL))
' setto pezzo da ricalcolare ' setto pezzo da ricalcolare
@@ -79,7 +79,8 @@ Public Class BTLStructureVM
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility)) Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
Case SelectionTypes.HIGHLIGHT Case SelectionTypes.HIGHLIGHT
If m_PrevSelectionType = SelectionTypes.SELECT_ Then If m_PrevSelectionType = SelectionTypes.SELECT_ Then
EgtBeamShowFacesName( False)
EgtBeamShowLoadingSide( False, False)
End If End If
If Not IsNothing(m_SelBTLPart) Then If Not IsNothing(m_SelBTLPart) Then
m_SelBTLPart = Nothing m_SelBTLPart = Nothing
@@ -181,6 +182,8 @@ Public Class BTLStructureVM
End Sub End Sub
Private Sub SelectBTLPart(BtlPart As BTLPartVM) Private Sub SelectBTLPart(BtlPart As BTLPartVM)
EgtBeamShowFacesName( False)
EgtBeamShowLoadingSide( False, False)
m_SelBTLPart = BtlPart m_SelBTLPart = BtlPart
If Map.refMainMenuVM.SelPage = Pages.VIEW Then If Map.refMainMenuVM.SelPage = Pages.VIEW Then
' se modalità building, la tolgo ' se modalità building, la tolgo
@@ -191,6 +194,10 @@ Public Class BTLStructureVM
SceneSelPartSelection() SceneSelPartSelection()
' seleziono pezzo in Db geometrico ' seleziono pezzo in Db geometrico
EgtBeamSetPart(BtlPart.nPartId) EgtBeamSetPart(BtlPart.nPartId)
EgtBeamShowFacesName( True)
Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM)
Dim bLeftToRight As Boolean = Not ( CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
EgtBeamShowLoadingSide( bLoadingSideShow, bLeftToRight)
' seleziono pagina BottomPanel ' seleziono pagina BottomPanel
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART) Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART)
'' mostro barra di gestione pezzo '' mostro barra di gestione pezzo
@@ -239,6 +246,8 @@ Public Class BTLStructureVM
Map.refProjectVM.BTLStructureVM.ShowSolid(False, BtlPart.nPartId) Map.refProjectVM.BTLStructureVM.ShowSolid(False, BtlPart.nPartId)
End If End If
If m_SelBTLPart Is BtlPart Then If m_SelBTLPart Is BtlPart Then
EgtBeamShowFacesName( False)
EgtBeamShowLoadingSide( False, False)
m_SelBTLPart = Nothing m_SelBTLPart = Nothing
NotifyPropertyChanged(NameOf(SelBTLPart)) NotifyPropertyChanged(NameOf(SelBTLPart))
End If End If
@@ -34,12 +34,6 @@ Public Class ChangeParameterWndVM
m_ParamList.Add(New Parameters(NewBTLParam)) m_ParamList.Add(New Parameters(NewBTLParam))
ParamIndex += 1 ParamIndex += 1
End While End While
'' leggo tutti i Q della feature
'ParamIndex = 1
'While BTLIniFile.GetBeamPrivateProfileParam(m_SelPRC.nGRP, m_SelPRC.nPRC, False, ParamIndex, Nothing, NewBTLParam)
' m_ParamList.Add(New Parameters(NewBTLParam))
' ParamIndex += 1
'End While
' aggiungo bDO come parametro ' aggiungo bDO come parametro
m_ParamList.Add(New Parameters(NewBTLParam, True)) m_ParamList.Add(New Parameters(NewBTLParam, True))
' seleziono parametro vuoto per dargli un valore iniziale ed evitare che visualizzi sia text che check ' seleziono parametro vuoto per dargli un valore iniziale ed evitare che visualizzi sia text che check
@@ -188,21 +182,21 @@ Public Class Parameters
End Property End Property
Private m_bActualValue As Boolean Private m_bActualValue As Boolean
Public Property bActualValue As String Public Property bActualValue As Boolean
Get Get
Return m_bActualValue Return m_bActualValue
End Get End Get
Set(value As String) Set(value As Boolean)
m_bActualValue = value m_bActualValue = value
End Set End Set
End Property End Property
Private m_bNewValue As String Private m_bNewValue As Boolean
Public Property bNewValue As String Public Property bNewValue As Boolean
Get Get
Return m_bNewValue Return m_bNewValue
End Get End Get
Set(value As String) Set(value As Boolean)
m_bNewValue = value m_bNewValue = value
End Set End Set
End Property End Property
@@ -234,6 +228,7 @@ Public Class Parameters
Sub New(BTLParamM As BTLParamM, Optional IsCheckBox As Boolean = False) Sub New(BTLParamM As BTLParamM, Optional IsCheckBox As Boolean = False)
MyBase.New(BTLParamM) MyBase.New(BTLParamM)
m_bIsCheckBox = IsCheckBox m_bIsCheckBox = IsCheckBox
If IsCheckBox Then m_BTLParamM.SetType(BTLParamType.CHECKBOX)
End Sub End Sub
'Shared Operator =(ByVal S1 As Parameters, ByVal S2 As BTLParam) As Boolean 'Shared Operator =(ByVal S1 As Parameters, ByVal S2 As BTLParam) As Boolean
@@ -400,7 +400,7 @@ Public Class ConfigurationPageVM
Dim FilePath As String = CurrentMachine.sMachDir & "\" & If(CurrentMachine.nType = MachineType.BEAM, BEAM_DIR, WALL_DIR) & "\" & TS3DATA_FILE Dim FilePath As String = CurrentMachine.sMachDir & "\" & If(CurrentMachine.nType = MachineType.BEAM, BEAM_DIR, WALL_DIR) & "\" & TS3DATA_FILE
Dim sBakFilePath As String = Path.ChangeExtension(FilePath, ".bak") Dim sBakFilePath As String = Path.ChangeExtension(FilePath, ".bak")
If File.Exists(sBakFilePath) Then File.Delete(sBakFilePath) If File.Exists(sBakFilePath) Then File.Delete(sBakFilePath)
File.Move(FilePath, sBakFilePath) If File.Exists(FilePath) Then File.Move(FilePath, sBakFilePath)
File.WriteAllLines(FilePath, NewTs3DataFileContent, Text.Encoding.UTF8) File.WriteAllLines(FilePath, NewTs3DataFileContent, Text.Encoding.UTF8)
' se macchina di tipo BOTH copio il file appena scritto nella cartella Wall nella cartella Beam ' se macchina di tipo BOTH copio il file appena scritto nella cartella Wall nella cartella Beam
If CurrentMachine.nType = MachineType.BOTH Then If CurrentMachine.nType = MachineType.BOTH Then
@@ -1,54 +0,0 @@
Module ConstMsg
Public Const MSG_SETUPERRORS As Integer = 5000 + 1470
Public Const MSG_MISSINGKEYWD As Integer = 10100
Public Const MSG_NUMERICKEYBOARDWD As Integer = 10200
Public Const MSG_MESSAGEBOX As Integer = 15000
Public Const MSG_EGTSAVEFILEDIALOG As Integer = 30000
Public Const MSG_OMAGCUT As Integer = 90000
Public Const MSG_GENERAL As Integer = MSG_OMAGCUT
Public Const MSG_WORKINPROGRESSPAGEUC As Integer = MSG_OMAGCUT + 100
Public Const MSG_DIRECTCUTPAGEUC As Integer = MSG_OMAGCUT + 200
Public Const MSG_MANUALAXESMOVEPAGEUC As Integer = MSG_OMAGCUT + 220
Public Const MSG_CADCUTPAGEUC As Integer = MSG_OMAGCUT + 300
Public Const MSG_NESTPAGEUC As Integer = MSG_OMAGCUT + 330
Public Const MSG_SPLITPAGEUC As Integer = MSG_OMAGCUT + 340
Public Const MSG_MOVERAWPAGEUC As Integer = MSG_OMAGCUT + 360
Public Const MSG_DRAWPAGEUC As Integer = MSG_OMAGCUT + 380
Public Const MSG_COMPONENTPAGEUC As Integer = MSG_OMAGCUT + 400
Public Const MSG_IMPORTPAGEUC As Integer = MSG_OMAGCUT + 450
Public Const MSG_OPENPAGEUC As Integer = MSG_OMAGCUT + 490
Public Const MSG_RAWPARTPAGEUC As Integer = MSG_OMAGCUT + 500
Public Const MSG_CHOOSEMACHININGPAGEUC As Integer = MSG_OMAGCUT + 535
Public Const MSG_SIMULATIONPAGEUC As Integer = MSG_OMAGCUT + 550
Public Const MSG_FRAMECUTPAGEUC As Integer = MSG_OMAGCUT + 600
Public Const MSG_MACHINEPAGEUC As Integer = MSG_OMAGCUT + 700
Public Const MSG_TOOLSDBPAGEUC As Integer = MSG_OMAGCUT + 720
Public Const MSG_MACHININGSDBPAGEUC As Integer = MSG_OMAGCUT + 760
Public Const MSG_COMBOBOXPARAM As Integer = MSG_OMAGCUT + 800
Public Const MSG_ALARMSPAGEUC As Integer = MSG_OMAGCUT + 900
Public Const MSG_MACHINECNPAGEUC As Integer = MSG_OMAGCUT + 950
Public Const MSG_OPTIONSPAGEUC As Integer = MSG_OMAGCUT + 980
Public Const MSG_EGTMSGBOX As Integer = MSG_OMAGCUT + 1100
Public Const MSG_CSVPAGEUC As Integer = MSG_OMAGCUT + 1200
Public Const MSG_OMAGOFFICE As Integer = 91400
Public Const MSG_OPTIONPANEL As Integer = MSG_OMAGOFFICE
Public Const MSG_MYMACHININGDBWINDOW As Integer = MSG_OMAGOFFICE + 50
Public Const MSG_TOPCMDBAR As Integer = MSG_OMAGOFFICE + 100
Public Const MSG_RAWPARTTAB As Integer = MSG_OMAGOFFICE + 150
Public Const MSG_VEINMATCHING As Integer = MSG_OMAGOFFICE + 200
Public Const MSG_GENERIC As Integer = MSG_OMAGOFFICE + 250
Public Const MSG_EGTWPFLIB5 As Integer = 30000
Public Const MSG_TOPCOMMANDBAR As Integer = MSG_EGTWPFLIB5 + 500
Public Const MSG_GRIDVIEWPANEL As Integer = MSG_EGTWPFLIB5 + 800
Public Const MSG_TOOLDB As Integer = MSG_EGTWPFLIB5 + 1000
Public Const MSG_TOOLDBERRORS As Integer = MSG_EGTWPFLIB5 + 1100
Public Const MSG_MACHININGDB As Integer = MSG_EGTWPFLIB5 + 1200
Public Const MSG_MACHININGDBERRORS As Integer = MSG_EGTWPFLIB5 + 1400
Public Const MSG_SIMULATION As Integer = MSG_EGTWPFLIB5 + 1600
End Module
@@ -102,6 +102,9 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon> <ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942"> <Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath> <HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
@@ -615,7 +618,6 @@
<Compile Include="ItemParamList\RawPartListV.xaml.vb"> <Compile Include="ItemParamList\RawPartListV.xaml.vb">
<DependentUpon>RawPartListV.xaml</DependentUpon> <DependentUpon>RawPartListV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Constants\ConstMsg.vb" />
<Compile Include="FeatureManager\FeatureManagerV.xaml.vb"> <Compile Include="FeatureManager\FeatureManagerV.xaml.vb">
<DependentUpon>FeatureManagerV.xaml</DependentUpon> <DependentUpon>FeatureManagerV.xaml</DependentUpon>
</Compile> </Compile>
@@ -732,6 +734,7 @@
<CustomToolNamespace>My.Resources</CustomToolNamespace> <CustomToolNamespace>My.Resources</CustomToolNamespace>
</EmbeddedResource> </EmbeddedResource>
<None Include="App.config" /> <None Include="App.config" />
<None Include="app.manifest" />
<None Include="My Project\Settings.settings"> <None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
@@ -946,6 +949,12 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\PartManager\Clock.png" /> <Resource Include="Resources\PartManager\Clock.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\LeftPanel\NewRawPartAuto.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\TopPanel\RemoveAllRawPart.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR32.exe <PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR32.exe
@@ -18,8 +18,12 @@ Public Class FeatureManagerVM
Public ReadOnly Property Edit_IsEnabled As Boolean Public ReadOnly Property Edit_IsEnabled As Boolean
Get Get
Return m_FeatureManager_IsEnabled AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 AndAlso Return m_FeatureManager_IsEnabled AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso
Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM.BTLFeatureM.IsFreeContour() AndAlso Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM.bDO Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 AndAlso
Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLParts(0)) AndAlso
Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM) AndAlso
Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM.BTLFeatureM.IsFreeContour() AndAlso
Map.refProjectVM.BTLStructureVM.SelBTLParts(0).SelBTLFeatureVM.bDO
End Get End Get
End Property End Property
@@ -19,7 +19,8 @@
Style="{StaticResource OptionTextBlock}"/> Style="{StaticResource OptionTextBlock}"/>
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}" <TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
Width="200" Width="200"
Visibility="{Binding Text_Visibility}" Margin="5,0,5,0"> Visibility="{Binding Text_Visibility}" Margin="5,0,5,0"
Style="{StaticResource FreeContour_TextBox}">
<TextBox.InputBindings> <TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/> <KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/> <KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/>
@@ -596,6 +596,12 @@ Public Class FreeContourManagerVM
Friend Sub UpdateUi() Friend Sub UpdateUi()
' se attiva operazione in piu' passaggi, esco ' se attiva operazione in piu' passaggi, esco
If Map.refSceneHostVM.MainController.GetContinue() Then Return If Map.refSceneHostVM.MainController.GetContinue() Then Return
' se finita creazione curva (è stata chiusa)
If Map.refFreeContourManagerVM.bIsCreatingPath Then
Dim nNewPathLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, "NewPathLayer")
Dim nNewPathId As Integer = EgtGetFirstInGroup(nNewPathLayerId)
If EgtGetType(nNewPathId) = GDB_TY.CRV_COMPO Then Map.refFreeContourManagerVM.CreatingPathEnd()
End If
' se non ci sono piu' i percorsi, permetto di aggiungerli ' se non ci sono piu' i percorsi, permetto di aggiungerli
If EgtGetType(m_nNewPathId) = GDB_TY.NONE Then If EgtGetType(m_nNewPathId) = GDB_TY.NONE Then
m_nNewPathId = GDB_ID.NULL m_nNewPathId = GDB_ID.NULL
@@ -925,6 +931,8 @@ Public Class FreeContourManagerVM
Return sLayerName = PATH_SIDEANGLAYER Return sLayerName = PATH_SIDEANGLAYER
ElseIf Map.refFreeContourManagerVM.bIsOpeningCurveCompo Then ElseIf Map.refFreeContourManagerVM.bIsOpeningCurveCompo Then
Return nId = m_nNewPathId Return nId = m_nNewPathId
Else
Return False
End If End If
End Function End Function
@@ -131,6 +131,18 @@
</Style> </Style>
</DataGridTextColumn.EditingElementStyle> </DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn> </DataGridTextColumn>
<!--PosZ - Posizione in Z-->
<DataGridTextColumn x:Key="colPOSZ" Binding="{Binding sPosZ}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="Blue" />
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<!--MAT - Materiale--> <!--MAT - Materiale-->
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}"> <DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
<DataGridTextColumn.Header> <DataGridTextColumn.Header>
@@ -69,6 +69,12 @@ Public Class RawPartListVM
End Get End Get
End Property End Property
Public ReadOnly Property PosZ_Msg As String
Get
Return EgtMsg(61728)
End Get
End Property
Public ReadOnly Property Material_Msg As String Public ReadOnly Property Material_Msg As String
Get Get
Return EgtMsg(61607) Return EgtMsg(61607)
@@ -90,6 +90,13 @@
Style="{StaticResource LeftPanel_Button}"> Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/> <Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding NewRawPartLast_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding NewRawPartLast_ToolTip}"
IsEnabled="{Binding LeftPanel_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPartAuto.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddToRawPart_Command}" <Button Command="{Binding AddToRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}" Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding AddToRawPart_ToolTip}" ToolTip="{Binding AddToRawPart_ToolTip}"
@@ -100,6 +100,7 @@ Public Class LeftPanelVM
' Definizione comandi ' Definizione comandi
Private m_cmdNewRawPart As ICommand Private m_cmdNewRawPart As ICommand
Private m_cmdNewRawPartLast As ICommand
Private m_cmdAddToRawPart As ICommand Private m_cmdAddToRawPart As ICommand
Private m_cmdCopyPart As ICommand Private m_cmdCopyPart As ICommand
Private m_cmdAddPart As ICommand Private m_cmdAddPart As ICommand
@@ -155,6 +156,12 @@ Public Class LeftPanelVM
End Get End Get
End Property End Property
Public ReadOnly Property NewRawPartLast_ToolTip As String
Get
Return EgtMsg(61977)
End Get
End Property
Public ReadOnly Property AddToRawPart_ToolTip As String Public ReadOnly Property AddToRawPart_ToolTip As String
Get Get
Return EgtMsg(61904) Return EgtMsg(61904)
@@ -258,7 +265,7 @@ Public Class LeftPanelVM
Public ReadOnly Property NewRawPart_Command As ICommand Public ReadOnly Property NewRawPart_Command As ICommand
Get Get
If m_cmdNewRawPart Is Nothing Then If m_cmdNewRawPart Is Nothing Then
m_cmdNewRawPart = New Command(AddressOf NewRawPart) m_cmdNewRawPart = New Command(AddressOf NewRawPartCmd)
End If End If
Return m_cmdNewRawPart Return m_cmdNewRawPart
End Get End Get
@@ -267,18 +274,49 @@ Public Class LeftPanelVM
''' <summary> ''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand. ''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary> ''' </summary>
Public Sub NewRawPart() Public Sub NewRawPartCmd()
NewRawPart(False)
End Sub
Public Sub NewRawPart(bLast As Boolean)
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
If IsNothing(SelPart) Then Return Dim SelParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
If IsNothing(SelParts) OrElse SelParts.Count <= 0 Then Return
' verifico che abbiano tutti la stessa sezione
Dim dHSection As Double = SelParts(0).dH
Dim dWSection As Double = SelParts(0).dW
For PartIndex = 0 To SelParts.Count - 1
Dim Part As BTLPartVM = SelParts(PartIndex)
If Not IsNothing(Part) Then
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
If Part.dH <> dHSection OrElse Part.dW <> dWSection Then
MessageBox.Show(EgtMsg(61970), EgtMsg(30007))
Return
End If
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
If Part.dH <> dHSection Then
MessageBox.Show(EgtMsg(61970), EgtMsg(30007))
Return
End If
End If
Else
SelParts.Remove(Part)
End If
Next
' se pareti e piu' di uno selezionato, esco
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL And SelParts.Count > 1 Then
MessageBox.Show(EgtMsg(61971), EgtMsg(30007))
Return
End If
' se nessun grezzo, rendo tutti i pezzi visibili ' se nessun grezzo, rendo tutti i pezzi visibili
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
Map.refProjectVM.BTLStructureVM.ShowAll(False) Map.refProjectVM.BTLStructureVM.ShowAll(False)
End If End If
' verifico se sono gia' stati messi tutti i pezzi richiesti ' verifico se sono gia' stati messi tutti i pezzi richiesti
If Not VerifyPartCount(SelPart) Then Return If Not VerifyPartCount(SelParts) Then Return
Dim dRawL As Double = SelPart.dL Dim dRawL As Double = SelParts(0).dL
Dim dRawW As Double = SelPart.dW Dim dRawW As Double = SelParts(0).dW
Dim dStartOffset As Double = 0 Dim dStartOffset As Double = 0
Dim dKerf As Double = 0 Dim dKerf As Double = 0
Dim dOffset As Double = WarehouseHelper.GetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE) Dim dOffset As Double = WarehouseHelper.GetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
@@ -313,22 +351,29 @@ Public Class LeftPanelVM
WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dRawW, dRawL) WarehouseHelper.GetCurrentDimensions(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dRawW, dRawL)
Case WarehouseType.MEDIUM Case WarehouseType.MEDIUM
Dim SectionList As List(Of SParam) = WarehouseHelper.GetSectionList() Dim SectionList As List(Of SParam) = WarehouseHelper.GetSectionList()
Dim SParamlist As List(Of SParam) = SectionList.FindAll(Function(x) x.SectXMat = SelPart.Section) Dim SParamlist As List(Of SParam) = SectionList.FindAll(Function(x) x.SectXMat = SelParts(0).Section)
If SParamlist.Count = 0 Then If bLast Then
' apro finestra con solo edit If SParamlist.Count > 0 Then
If AddRawPartWnd(AddRawPartWndVM.EditTypes.ONLY_TEXT, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then dRawL = SParamlist(0).dL
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset) dRawW = SParamlist(0).dW
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
WarehouseHelper.SetStartOffset(dStartOffset)
Else
WarehouseHelper.SetKerf(dKerf)
End If
Else Else
MessageBox.Show(EgtMsg(61975), EgtMsg(30007))
Return Return
End If End If
ElseIf SParamlist.Count = 1 Then Else
' se premuto shift If SParamlist.Count = 0 Then
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then ' apro finestra con solo edit
If AddRawPartWnd(AddRawPartWndVM.EditTypes.ONLY_TEXT, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
WarehouseHelper.SetStartOffset(dStartOffset)
Else
WarehouseHelper.SetKerf(dKerf)
End If
Else
Return
End If
ElseIf SParamlist.Count > 0 Then
' imposto finestra con anche edit ' imposto finestra con anche edit
If AddRawPartWnd(AddRawPartWndVM.EditTypes.TEXT_AND_COMBO, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then If AddRawPartWnd(AddRawPartWndVM.EditTypes.TEXT_AND_COMBO, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset) WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
@@ -340,58 +385,69 @@ Public Class LeftPanelVM
Else Else
Return Return
End If End If
Else
' creo grezzo con l'unico materiale
dRawL = SParamlist(0).dL
dRawW = SParamlist(0).dW
End If
Else
' imposto finestra di sola scelta dimensione
Dim EditType As AddRawPartWndVM.EditTypes = AddRawPartWndVM.EditTypes.ONLY_COMBO
' se premuto shift
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
' imposto finestra con anche edit
EditType = AddRawPartWndVM.EditTypes.TEXT_AND_COMBO
End If
If AddRawPartWnd(EditType, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
WarehouseHelper.SetStartOffset(dStartOffset)
Else
WarehouseHelper.SetKerf(dKerf)
End If
Else
Return
End If End If
End If End If
End Select End Select
End If End If
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
' verifico se lunghezza barra e' maggiore della lunghezza dei pezzi
Dim dTotLen As Double = WarehouseHelper.GetStartOffset()
For PartIndex = 0 To SelParts.Count - 1
If PartIndex <> 0 Then
dTotLen += WarehouseHelper.GetOffset(BWType.BEAM)
End If
dTotLen += SelParts(PartIndex).dL
Next
If dTotLen > dRawL Then
MessageBox.Show(EgtMsg(61972), EgtMsg(30007))
Return
End If
End If
' creo nuovo gruppo di lavorazione ' creo nuovo gruppo di lavorazione
Map.refMachGroupPanelVM.AddMachGroup() Map.refMachGroupPanelVM.AddMachGroup()
Dim nCurrMachGroup As Integer = EgtGetCurrMachGroup() Dim nCurrMachGroup As Integer = EgtGetCurrMachGroup()
Dim sCurrMachGroupName As String = "" Dim sCurrMachGroupName As String = ""
EgtGetMachGroupName(nCurrMachGroup, sCurrMachGroupName) EgtGetMachGroupName(nCurrMachGroup, sCurrMachGroupName)
' creo copia del pezzo
Dim nPartDuploId As Integer = EgtDuploNew(SelPart.nPartId)
' elimino valori calcolo dell'originale
MyMachGroupPanelVM.DuploRemoveProjCalc(nPartDuploId)
' lo rendo std
EgtSetMode(nPartDuploId, GDB_MD.STD)
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt" Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
' scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione ' scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
EgtSetInfo(nCurrMachGroup, MGR_RPT_PRODID, Map.refProdManagerVM.CurrProd.nProdId) EgtSetInfo(nCurrMachGroup, MGR_RPT_PRODID, Map.refProdManagerVM.CurrProd.nProdId)
EgtSetInfo(nCurrMachGroup, MGR_RPT_PATTID, nCurrMachGroup) EgtSetInfo(nCurrMachGroup, MGR_RPT_PATTID, nCurrMachGroup)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
' ordino i pezzi per lunghezza
SelParts = SelParts.OrderBy(Function(x) x.dL).ToList
' creo copie dei pezzi
Dim nPartDuploIdList As New List(Of Integer)
For Each Part In SelParts
Dim nDuploId As Integer = EgtDuploNew(Part.nPartId)
' elimino valori calcolo dell'originale
MyMachGroupPanelVM.DuploRemoveProjCalc(nDuploId)
' lo rendo std
EgtSetMode(nDuploId, GDB_MD.STD)
nPartDuploIdList.Add(nDuploId)
Next
' scrivo dati costruzione grezzo in gruppo di lavorazione ' scrivo dati costruzione grezzo in gruppo di lavorazione
EgtSetInfo(nCurrMachGroup, MGR_RPT_BARLEN, dRawL) EgtSetInfo(nCurrMachGroup, MGR_RPT_BARLEN, dRawL)
EgtSetInfo(nCurrMachGroup, MGR_RPT_MATERIAL, SelPart.sMATERIAL) EgtSetInfo(nCurrMachGroup, MGR_RPT_MATERIAL, SelPart.sMATERIAL)
EgtSetInfo(nCurrMachGroup, MGR_RPT_PART & 1, nPartDuploId & "," & DoubleToString(dStartOffset, 3)) ' scrivo dati di tutti i pezzi
Dim dPosX As Double = WarehouseHelper.GetStartOffset()
' ciclo sui pezzi
For nIndex = 0 To nPartDuploIdList.Count - 1
' se non è primo, aggiungo offset tra barre standard
If nIndex <> 0 Then
dPosX += WarehouseHelper.GetOffset(BWType.BEAM)
End If
EgtSetInfo(nCurrMachGroup, MGR_RPT_PART & nIndex + 1, nPartDuploIdList(nIndex) & "," & DoubleToString(dPosX, 3))
' incremento posizione della sua lunghezza
dPosX += SelParts(nIndex).dL
Next
Dim BeamMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.GetLastMachGroup() Dim BeamMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.GetLastMachGroup()
' eseguo script creazione grezzo ' eseguo script creazione grezzo
Dim nERR As Integer = 0 Dim nERR As Integer = 0
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
' elimino duplo e gruppo di lavorazione ' elimino duplo e gruppo di lavorazione
EgtErase(nPartDuploId) For Each nDuploId In nPartDuploIdList
EgtErase(nDuploId)
Next
BeamMachGroup.DeleteMachGroup() BeamMachGroup.DeleteMachGroup()
If File.Exists(sLogPath) Then If File.Exists(sLogPath) Then
Dim LogFile As String() = File.ReadAllLines(sLogPath) Dim LogFile As String() = File.ReadAllLines(sLogPath)
@@ -399,7 +455,7 @@ Public Class LeftPanelVM
MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error) MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Else Else
MessageBox.Show("Impossible creating rawpart", EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error) MessageBox.Show(EgtMsg(61973), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
' se nessun grezzo, rimetto tutti i pezzi invisibili ' se nessun grezzo, rimetto tutti i pezzi invisibili
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
@@ -407,10 +463,14 @@ Public Class LeftPanelVM
End If End If
Return Return
End If End If
EgtSetInfo(nPartDuploId, MGR_PRT_ROT, SelPart.nROTATED) For nDuploIndex = 0 To SelParts.Count - 1
EgtSetInfo(nPartDuploId, MGR_PRT_FLIP, SelPart.nINVERTED) EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_ROT, SelParts(nDuploIndex).nROTATED)
EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_FLIP, SelParts(nDuploIndex).nINVERTED)
Next
' aggiorno contatore pezzi usati in Prod ' aggiorno contatore pezzi usati in Prod
SelPart.RefreshPartInProd() For Each SelPart In SelParts
SelPart.RefreshPartInProd()
Next
'aggiorno lista pezzi 'aggiorno lista pezzi
BeamMachGroup.MyMachGroupM.RefreshPartList() BeamMachGroup.MyMachGroupM.RefreshPartList()
BeamMachGroup.MyMachGroupM.RefreshGroupData() BeamMachGroup.MyMachGroupM.RefreshGroupData()
@@ -418,6 +478,7 @@ Public Class LeftPanelVM
BeamMachGroup.UpdateUsage() BeamMachGroup.UpdateUsage()
Core.ViewPanelVM.BWSetView(VT.ISO_SW, False) Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
Dim nPartDuploId As Integer = EgtDuploNew(SelPart.nPartId)
' scrivo dati in gruppo di lavorazione ' scrivo dati in gruppo di lavorazione
Dim dPosX As Double = dKerf Dim dPosX As Double = dKerf
Dim dPosY As Double = dKerf Dim dPosY As Double = dKerf
@@ -438,7 +499,7 @@ Public Class LeftPanelVM
MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error) MessageBox.Show(LogFile(1), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Else Else
MessageBox.Show("Impossible creating rawpart", EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error) MessageBox.Show(EgtMsg(61973), EgtMsg(30007), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
' se nessun grezzo, rimetto tutti i pezzi invisibili ' se nessun grezzo, rimetto tutti i pezzi invisibili
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
@@ -481,16 +542,111 @@ Public Class LeftPanelVM
dKerf = AddRawPartWndVM.VariableList(2).dValue dKerf = AddRawPartWndVM.VariableList(2).dValue
dOffset = AddRawPartWndVM.VariableList(3).dValue dOffset = AddRawPartWndVM.VariableList(3).dValue
End Select End Select
' verifico se il materiale esiste in magazzino o devo aggiungerlo
Dim CurrSParam As SParam
Select Case EditType
Case AddRawPartWndVM.EditTypes.ONLY_TEXT
' lo aggiungo a lista materiali in magazzino
CurrSParam = AddRawMaterial(dRawW, dRawL)
Case AddRawPartWndVM.EditTypes.ONLY_COMBO
' non faccio nulla
Case AddRawPartWndVM.EditTypes.TEXT_AND_COMBO
' verifico se lunghezza testo corrisponde a materiale
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
CurrSParam = SParamlist.FirstOrDefault(Function(x) x.dL = AddRawPartWndVM.VariableList(0).dValue)
Else
CurrSParam = SParamlist.FirstOrDefault(Function(x) x.dL = AddRawPartWndVM.VariableList(1).dValue AndAlso x.dW = AddRawPartWndVM.VariableList(0).dValue)
End If
If IsNothing(CurrSParam) Then
' lo aggiungo a lista materiali in magazzino
CurrSParam = AddRawMaterial(dRawW, dRawL)
End If
End Select
' imposto il materiale selezionato come ultimo utilizzato
Return True Return True
End Function End Function
Private Function VerifyPartCount(SelPart As BTLPartVM) As Boolean Private Function AddRawMaterial(dRawW As Double, ByRef dRawL As Double) As SParam
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
Dim nQuantity As Integer = GetMainPrivateProfileInt(S_WAREHOUSE, K_DEFAULTQUANTITY, 1)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
' creo sParam
Dim CurrSParam As New SParam(Map.refProjectVM.BTLStructureVM.SelBTLPart.Section, dRawL, nQuantity, False)
Dim sL As String = String.Empty
sL = LenToString(CurrSParam.dL, 3)
' ricavo l'indice del SecionXMaterial dalla Beam_List
Dim SectXMatIndex As Integer = 1
Dim sSxMValue As String = ""
While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, SectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
If sSxMValue = CurrSParam.sValue Then
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
Exit While
End If
SectXMatIndex += 1
End While
' ricavo nuovo indice materiale
Dim ParamIndex As Integer = 1
Dim sParam As String = ""
While GetPrivateProfileString(S_BEAM, K_L & ParamIndex, "", sParam, sWarehousePath) > 0
ParamIndex += 1
End While
' lo aggiungo in warehouse
WritePrivateProfileString(S_BEAM, K_L & ParamIndex,
SectXMatIndex & "," & sL & "," & CurrSParam.nQuantity & "," & If(CurrSParam.bActive, 1, 0),
sWarehousePath)
Return CurrSParam
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
' creo sParam
Dim CurrSParam As New SParam(Map.refProjectVM.BTLStructureVM.SelBTLPart.Section, dRawW, dRawL, nQuantity, False)
Dim sW As String = String.Empty
Dim sL As String = String.Empty
sW = LenToString(CurrSParam.dW, 3)
sL = LenToString(CurrSParam.dL, 3)
' ricavo l'indice del SecionXMaterial dalla Wall_List
Dim SectXMatIndex As Integer = 1
Dim sSxMValue As String = ""
While EgtUILib.GetPrivateProfileString(S_WALL_LIST, SectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
If sSxMValue = CurrSParam.sValue Then
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
Exit While
End If
SectXMatIndex += 1
End While
' ricavo nuovo indice materiale
Dim ParamIndex As Integer = 1
Dim sParam As String = ""
While GetPrivateProfileString(S_WALL, K_S & ParamIndex, "", sParam, sWarehousePath) = 0
ParamIndex += 1
End While
' lo aggiungo in warehouse
WritePrivateProfileString(S_WALL, K_S & ParamIndex,
SectXMatIndex & "," & sW & "," & sL & "," & CurrSParam.nQuantity & "," & If(CurrSParam.bActive, 1, 0),
sWarehousePath)
Return CurrSParam
End If
End Function
Private Function VerifyPartCount(SelParts As List(Of BTLPartVM)) As Boolean
' verifico se ci sono pezzi da aggiungere ' verifico se ci sono pezzi da aggiungere
If Not SelPart.CanAddPartToCount Then Dim ToAddList As New List(Of String)
' se non ci sono, chiedo se aggiungerne uno nuovo Dim ToAddVM As New List(Of BTLPartVM)
If MessageBox.Show(EgtMsg(61863) & For Each SelPart In SelParts
SelPart.nCNT & EgtMsg(61864) & SelPart.nADDED & EgtMsg(61865), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then If Not SelPart.CanAddPartToCount Then
SelPart.AddNewPartToAdded() ToAddList.Add(SelPart.nCNT & EgtMsg(61864) & SelPart.nADDED & EgtMsg(61865))
ToAddVM.Add(SelPart)
End If
Next
' se non ci sono, chiedo se aggiungerne uno nuovo
If ToAddList.Count > 0 Then
Dim sMessage As String = EgtMsg(61863) & Environment.NewLine
For Each sPart In ToAddList
sMessage &= " - " & sPart & Environment.NewLine
Next
If MessageBox.Show(sMessage & EgtMsg(61893), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
For Each PartVM In ToAddVM
PartVM.AddNewPartToAdded()
Next
Else Else
Return False Return False
End If End If
@@ -500,6 +656,29 @@ Public Class LeftPanelVM
#End Region ' NewRawPart #End Region ' NewRawPart
#Region "NewRawPartLast"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property NewRawPartLast_Command As ICommand
Get
If m_cmdNewRawPartLast Is Nothing Then
m_cmdNewRawPartLast = New Command(AddressOf NewRawPartLast)
End If
Return m_cmdNewRawPartLast
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub NewRawPartLast()
NewRawPart(True)
End Sub
#End Region ' NewRawPartLast
#Region "AddToRawPart" #Region "AddToRawPart"
''' <summary> ''' <summary>
@@ -520,13 +699,25 @@ Public Class LeftPanelVM
Public Sub AddToRawPart() Public Sub AddToRawPart()
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
Dim SelParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
For Index = 0 To SelParts.Count() - 1
If IsNothing(SelParts(Index)) Then
SelParts.RemoveAt(Index)
End If
Next
If IsNothing(SelPart) Then Return If IsNothing(SelPart) Then Return
If IsNothing(SelParts) OrElse SelParts.Count <= 0 Then Return
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
If IsNothing(SelMachGroup) Then Return If IsNothing(SelMachGroup) Then Return
' se pareti e piu' di uno selezionato, esco
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL And SelParts.Count > 1 Then
MessageBox.Show(EgtMsg(61971), EgtMsg(30007))
Return
End If
' se MachGroup gia' mandato in produzione, esco ' se MachGroup gia' mandato in produzione, esco
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
' verifico se sono gia' stati messi tutti i pezzi richiesti ' verifico se sono gia' stati messi tutti i pezzi richiesti
If Not VerifyPartCount(SelPart) Then Return If Not VerifyPartCount(SelParts) Then Return
' verifico se impostato gruppo di lavorazione ' verifico se impostato gruppo di lavorazione
Dim nCurrMachgroupId As Integer = EgtGetCurrMachGroup() Dim nCurrMachgroupId As Integer = EgtGetCurrMachGroup()
' se nullo o diverso da quello selezionato in lista ' se nullo o diverso da quello selezionato in lista
@@ -537,18 +728,22 @@ Public Class LeftPanelVM
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
Dim BeamMachGroup As MyMachGroupVM = SelMachGroup Dim BeamMachGroup As MyMachGroupVM = SelMachGroup
' verifico sezione e materiale ' verifico sezione e materiale
If SelPart.Section <> BeamMachGroup.Section Then For Each Part In SelParts
MessageBox.Show(EgtMsg(61866), EgtMsg(30007)) If Part.Section <> BeamMachGroup.Section Then
Return MessageBox.Show(EgtMsg(61866), EgtMsg(30007))
End If Return
End If
Next
' verifico lunghezza totale ' verifico lunghezza totale
If Not VerifyTotLength(BeamMachGroup, SelPart) Then If Not VerifyTotLength(BeamMachGroup, SelParts) Then
MessageBox.Show(EgtMsg(61867), EgtMsg(30007)) MessageBox.Show(EgtMsg(61867), EgtMsg(30007))
Return Return
End If End If
If AddPartToBeam(BeamMachGroup, SelPart) Then If AddPartToBeam(BeamMachGroup, SelParts) Then
' aggiorno contatore pezzi usati in Prod ' aggiorno contatore pezzi usati in Prod
SelPart.RefreshPartInProd() For Each Part In SelParts
Part.RefreshPartInProd()
Next
' resetto stato di calc ' resetto stato di calc
SelMachGroup.ResetCalcMachGroup() SelMachGroup.ResetCalcMachGroup()
End If End If
@@ -558,7 +753,7 @@ Public Class LeftPanelVM
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
Dim WallMachGroup As MyMachGroupVM = SelMachGroup Dim WallMachGroup As MyMachGroupVM = SelMachGroup
' verifico spessore ' verifico spessore
If SelPart.dH < WallMachGroup.dH - EPS_SMALL OrElse SelPart.dH > WallMachGroup.dH + EPS_SMALL Then If SelPart.Section <> WallMachGroup.Section Then
MessageBox.Show(EgtMsg(61868), EgtMsg(30007)) MessageBox.Show(EgtMsg(61868), EgtMsg(30007))
Return Return
End If End If
@@ -575,74 +770,93 @@ Public Class LeftPanelVM
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
End Sub End Sub
Friend Function VerifyTotLength(BeamMachGroup As MyMachGroupVM, PartToAdd As BTLPartVM) As Boolean Friend Function VerifyTotLength(BeamMachGroup As MyMachGroupVM, PartsToAdd As List(Of BTLPartVM)) As Boolean
Dim dNewPartPos As Double = 0 Dim dNewPartPos As Double = 0
If BeamMachGroup.PartVMList.Count > 0 Then If BeamMachGroup.PartVMList.Count > 0 Then
Dim LastPart As PartVM = BeamMachGroup.PartVMList(BeamMachGroup.PartVMList.Count - 1) Dim LastPart As PartVM = BeamMachGroup.PartVMList(BeamMachGroup.PartVMList.Count - 1)
dNewPartPos += LastPart.dPOSX + LastPart.dL dNewPartPos += LastPart.dPOSX + LastPart.dL
End If End If
dNewPartPos += WarehouseHelper.GetOffset(BeamMachGroup.nType) + PartToAdd.dL For Each Part In PartsToAdd
dNewPartPos += WarehouseHelper.GetOffset(BeamMachGroup.nType) + Part.dL
Next
Return dNewPartPos < BeamMachGroup.dL Return dNewPartPos < BeamMachGroup.dL
End Function End Function
Friend Function AddPartToBeam(BeamMachGroup As MyMachGroupVM, PartToAdd As BTLPartVM) As Boolean Friend Function AddPartToBeam(BeamMachGroup As MyMachGroupVM, PartsToAdd As List(Of BTLPartVM)) As Boolean
' creo copia del pezzo ' ordino i pezzi da aggiungere
Dim nPartDuploId As Integer = EgtDuploNew(PartToAdd.nPartId) PartsToAdd = PartsToAdd.OrderBy(Function(x) x.dL).ToList()
' lo rendo std ' creo copie dei pezzi
EgtSetMode(nPartDuploId, GDB_MD.STD) Dim nPartDuploIdList As New List(Of Integer)
For Each Part In PartsToAdd
Dim nDuploId As Integer = EgtDuploNew(Part.nPartId)
' elimino valori calcolo dell'originale
MyMachGroupPanelVM.DuploRemoveProjCalc(nDuploId)
' lo rendo std
EgtSetMode(nDuploId, GDB_MD.STD)
nPartDuploIdList.Add(nDuploId)
Next
' calcolo posizione nuovo pezzo per rispettare ordine lunghezze ' calcolo posizione nuovo pezzo per rispettare ordine lunghezze
Dim nInsertIndex As Integer Dim nInsertIndex As Integer
' scrivo dati di tutti i pezzi ' scrivo dati di tutti i pezzi
Dim dPosX As Double = BeamMachGroup.dStartCut Dim dPosX As Double = BeamMachGroup.dStartCut
Dim bPartAdded As Boolean = False Dim nPartIndex As Integer = 0
Dim nIndex As Integer Dim nIndex As Integer
' ciclo sui pezzi ' ciclo sui pezzi
For nIndex = 0 To BeamMachGroup.PartVMList.Count - 1 For nIndex = 0 To BeamMachGroup.PartVMList.Count - 1
' se non ancora aggiunto e lunghezza minore del pezzo corrente, lo aggiungo For PartsToAddIndex = nPartIndex To PartsToAdd.Count - 1
If Not bPartAdded AndAlso BeamMachGroup.PartVMList(nIndex).dL > PartToAdd.dL Then Dim Part As BTLPartVM = PartsToAdd(PartsToAddIndex)
' se non è primo, aggiungo offset tra barre standard ' se non ancora aggiunto e lunghezza minore del pezzo corrente, lo aggiungo
If nIndex <> 0 Then If nPartIndex < nPartDuploIdList.Count() AndAlso BeamMachGroup.PartVMList(nIndex).dL > Part.dL Then
dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType) ' se non è primo, aggiungo offset tra barre standard
If nIndex <> 0 OrElse nPartIndex <> 0 Then
dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType)
End If
EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1, nPartDuploIdList(nPartIndex) & "," & DoubleToString(dPosX, 3))
' incremento posizione della sua lunghezza
dPosX += Part.dL
' conservo indice d'inserimento
nInsertIndex = nIndex
nPartIndex += 1
Else
Exit For
End If End If
EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1, nPartDuploId & "," & DoubleToString(dPosX, 3)) Next
' incremento posizione della sua lunghezza
dPosX += PartToAdd.dL
' conservo indice d'inserimento
nInsertIndex = nIndex
bPartAdded = True
End If
' se non è primo, aggiungo offset del pezzo ' se non è primo, aggiungo offset del pezzo
If nIndex <> 0 Then If nIndex <> 0 Then
dPosX += BeamMachGroup.PartVMList(nIndex).dOffset dPosX += BeamMachGroup.PartVMList(nIndex).dOffset
' se sono a indice primo ed è stato aggiunto pezzo nuovo ' se sono a indice primo ed è stato aggiunto pezzo nuovo
ElseIf nIndex = 0 AndAlso bPartAdded Then ElseIf nIndex = 0 AndAlso nPartIndex > 0 Then
' aggiungo offset tra barre standard ' aggiungo offset tra barre standard
dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType) dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType)
End If End If
EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + If(bPartAdded, 2, 1), BeamMachGroup.PartVMList(nIndex).nPartId & "," & DoubleToString(dPosX, 3)) EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1, BeamMachGroup.PartVMList(nIndex).nPartId & "," & DoubleToString(dPosX, 3))
' incremento posizione della sua lunghezza ' incremento posizione della sua lunghezza
dPosX += BeamMachGroup.PartVMList(nIndex).dL dPosX += BeamMachGroup.PartVMList(nIndex).dL
Next Next
' se non è ancora stato aggiunto ' se non è ancora stato aggiunto
If Not bPartAdded Then For PartsToAddIndex = nPartIndex To PartsToAdd.Count - 1
' aggiungo offset tra barre standard ' aggiungo offset tra barre standard
dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType) dPosX += WarehouseHelper.GetOffset(BeamMachGroup.nType)
' lo aggiungo in fondo ' lo aggiungo in fondo
EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1, nPartDuploId & "," & DoubleToString(dPosX, 3)) EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1, nPartDuploIdList(nPartIndex) & "," & DoubleToString(dPosX, 3))
' conservo indice d'inserimento ' conservo indice d'inserimento
nInsertIndex = nIndex nInsertIndex = nIndex
End If nPartIndex += 1
Next
' elimino vecchio grezzo ed eseguo script creazione nuovo ' elimino vecchio grezzo ed eseguo script creazione nuovo
Dim nRawId As Integer = EgtGetFirstRawPart() Dim nRawId As Integer = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL While nRawId <> GDB_ID.NULL
EgtRemoveRawPart(nRawId) EgtRemoveRawPart(nRawId)
nRawId = EgtGetFirstRawPart() nRawId = EgtGetFirstRawPart()
End While End While
If Not ExecBeam(Map.refMainWindowVM.MainWindowM.sTempDir, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
Return False Return False
End If End If
EgtSetInfo(nPartDuploId, MGR_PRT_ROT, PartToAdd.nROTATED) For nDuploIndex = 0 To PartsToAdd.Count - 1
EgtSetInfo(nPartDuploId, MGR_PRT_FLIP, PartToAdd.nINVERTED) EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_ROT, PartsToAdd(nDuploIndex).nROTATED)
EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_FLIP, PartsToAdd(nDuploIndex).nINVERTED)
Next
' aggiorno lista pezzi ' aggiorno lista pezzi
BeamMachGroup.MyMachGroupM.RefreshPartList() BeamMachGroup.MyMachGroupM.RefreshPartList()
' seleziono pezzo aggiunto ' seleziono pezzo aggiunto
@@ -756,7 +970,7 @@ Public Class LeftPanelVM
Dim NewPart As BTLPartM = SelPart.Copy() Dim NewPart As BTLPartM = SelPart.Copy()
If Not IsNothing(NewPart) Then If Not IsNothing(NewPart) Then
' selezione ultimo che e' quello appena creato ' selezione ultimo che e' quello appena creato
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1)) Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1), False, True)
End If End If
End Sub End Sub
@@ -945,16 +1159,25 @@ Public Class LeftPanelVM
If IsNothing(Map.refProjManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) Then Return If IsNothing(Map.refProjManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
' salvo sezione impostata ' salvo sezione impostata
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
' se modalita' assemblato
Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
' devo smontarlo prima di ruotare le travi
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
End If
' ruoto i pezzi selezionati ' ruoto i pezzi selezionati
For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts
Part.BackRotation() Part.BackRotation(False, False)
Next Next
' se assemblato lo ripristino
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi) ' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
' se esiste, imposto sezione inversa ' se esiste, imposto sezione inversa
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0)) Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection) If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
End If End If
EgtDraw()
End Sub End Sub
#End Region ' BackRotation #End Region ' BackRotation
@@ -980,16 +1203,25 @@ Public Class LeftPanelVM
If IsNothing(Map.refProjManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) Then Return If IsNothing(Map.refProjManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
' salvo sezione impostata ' salvo sezione impostata
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
' se modalita' assemblato
Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
' devo smontarlo prima di ruotare le travi
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
End If
' ruoto i pezzi selezionati ' ruoto i pezzi selezionati
For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts
Part.ForwardRotation() Part.ForwardRotation(False, False)
Next Next
' se assemblato lo ripristino
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(True, False)
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi) ' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
' se esiste, imposto sezione inversa ' se esiste, imposto sezione inversa
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0)) Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection) If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
End If End If
EgtDraw()
End Sub End Sub
#End Region ' ForwardRotation #End Region ' ForwardRotation
@@ -241,5 +241,4 @@ Public Class MyMachGroupPanelVM
#End Region ' METHODS #End Region ' METHODS
End Class End Class
@@ -278,6 +278,38 @@ Public Class MyMachGroupVM
#End Region ' Beam #End Region ' Beam
#Region "Wall"
Public Property sPosZ As String
Get
Return LenToString(MyMachGroupM.dPosZ, 3)
End Get
Set(value As String)
Dim dValue As Double
If StringToLen(value, dValue) Then
Dim nRawPartId As Integer = EgtGetFirstRawPart()
If dValue <> MyMachGroupM.dPosZ Then
Select Case nType
Case BWType.BEAM
' non utilizzato
Case BWType.WALL
' se operazione di spostamento in z ha successo
If True Then
EgtSetInfo(Id, MGR_RPT_PANELPOSZ, dValue)
EgtDraw()
MyMachGroupM.dPosZ = dValue
Else
NotifyPropertyChanged(NameOf(sPosZ))
End If
End Select
ResetCalcTotalMachGroup()
End If
End If
End Set
End Property
#End Region ' Wall
#End Region ' FIELDS & PROPERTIES #End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTORS" #Region "CONSTRUCTORS"
@@ -305,7 +337,7 @@ Public Class MyMachGroupVM
End Sub End Sub
Public Function Copy(Optional Qty As Integer = 1) As Core.MyMachGroupVM Public Shadows Function Copy(Optional Qty As Integer = 1) As Core.MyMachGroupVM
Dim BeamWallMachGroup As MyMachGroupVM = Nothing Dim BeamWallMachGroup As MyMachGroupVM = Nothing
If nType = BWType.BEAM Then If nType = BWType.BEAM Then
EgtResetCurrMachGroup() EgtResetCurrMachGroup()
@@ -479,7 +511,8 @@ Public Class MyMachGroupVM
EgtRemoveRawPart(nRawId) EgtRemoveRawPart(nRawId)
nRawId = EgtGetFirstRawPart() nRawId = EgtGetFirstRawPart()
End While End While
If Not ExecBeam(Map.refMainWindowVM.MainWindowM.sTempDir, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then Return False Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then Return False
Return True Return True
End Function End Function
@@ -17,7 +17,7 @@ Public Class PartVM
' variabile che indica se almeno un pezzo e' stato modificato durante il caricamento del progetto ' variabile che indica se almeno un pezzo e' stato modificato durante il caricamento del progetto
Private Shared m_PartModifiedOnLoading As Boolean = False Private Shared m_PartModifiedOnLoading As Boolean = False
Public ReadOnly Property dVolume As Double Public Overloads ReadOnly Property dVolume As Double
Get Get
Return dVolume Return dVolume
End Get End Get
@@ -72,6 +72,7 @@ Public Class PartVM
BeamMachGroup.dStartCut = dOldValue BeamMachGroup.dStartCut = dOldValue
BeamMachGroup.ReDrawBeamMachgroup() BeamMachGroup.ReDrawBeamMachgroup()
End If End If
EgtDraw()
' resetto validazione del pezzo ' resetto validazione del pezzo
ResetCalcPart() ResetCalcPart()
ParentMachGroupVM.UpdateUsage() ParentMachGroupVM.UpdateUsage()
@@ -227,8 +227,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico ' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey) m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2407, 1, m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(5327, 2411, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2407, 1, m_nKeyOptions) EgtGetKeyOptions(5327, 2411, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
@@ -14,18 +14,18 @@ Imports System.Windows
#If PLATFORM = "x64" Then #If PLATFORM = "x64" Then
#If DEBUG Then #If DEBUG Then
<Assembly: AssemblyTitle("EgtBEAMWALL.ViewerOptimizerD64.exe")> <Assembly: AssemblyTitle("EgtBEAMWALL.ViewerOptimizerD64.exe")>
<Assembly: AssemblyDescription("EgtBEAMWALL.ViewerOptimizer Debug 64 bit")> <Assembly: AssemblyDescription("EgtBEAMWALL VO Debug 64 bit")>
#Else #Else
<Assembly: AssemblyTitle("EgtBEAMWALL.ViewerOptimizerR64.exe")> <Assembly: AssemblyTitle("EgtBEAMWALL.ViewerOptimizerR64.exe")>
<Assembly: AssemblyDescription("EgtBEAMWALL.ViewerOptimizer 64 bit")> <Assembly: AssemblyDescription("EgtBEAMWALL VO 64 bit")>
#End if #End if
#Else #Else
#If DEBUG Then #If DEBUG Then
<Assembly: AssemblyTitle("EgtBEAMWALL.ViewerOptimizerD32.exe")> <Assembly: AssemblyTitle("EgtBEAMWALL.ViewerOptimizerD32.exe")>
<Assembly: AssemblyDescription("EgtBEAMWALL Debug 32 bit")> <Assembly: AssemblyDescription("EgtBEAMWALL VO Debug 32 bit")>
#Else #Else
<Assembly: AssemblyTitle("EgtBEAMWALL.ViewerOptimizerR32.exe")> <Assembly: AssemblyTitle("EgtBEAMWALL.ViewerOptimizerR32.exe")>
<Assembly: AssemblyDescription("EgtBEAMWALL 32 bit")> <Assembly: AssemblyDescription("EgtBEAMWALL VO 32 bit")>
#End If #End If
#End If #End If
<Assembly: AssemblyCompany("Egalware s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.7.1")> <Assembly: AssemblyVersion("2.4.11.3")>
<Assembly: AssemblyFileVersion("2.4.7.1")> <Assembly: AssemblyFileVersion("2.4.11.3")>
@@ -114,6 +114,11 @@ Public Class ProdManagerVM
Return EgtMsg(61922) Return EgtMsg(61922)
End Get End Get
End Property End Property
Public ReadOnly Property GoToSupervisor_ToolTip As String
Get
Return EgtMsg(61974)
End Get
End Property
#End Region ' ToolTip #End Region ' ToolTip
@@ -643,7 +643,7 @@ Public Class ProjManagerVM
Dim Machine As Machine = Nothing Dim Machine As Machine = Nothing
Dim nType As BWType = BWType.NULL Dim nType As BWType = BWType.NULL
Dim ProjectTypeWndVM As New ProjectTypeWndVM() Dim ProjectTypeWndVM As New ProjectTypeWndVM()
If ProjectTypeWndVM.MachineList.Count = 1 And DirectCast(ProjectTypeWndVM.SelMachine, MyMachine).nType <> MachineType.BOTH Then If ProjectTypeWndVM.MachineList.Count = 1 AndAlso DirectCast(ProjectTypeWndVM.SelMachine, MyMachine).nType <> MachineType.BOTH Then
Machine = ProjectTypeWndVM.SelMachine Machine = ProjectTypeWndVM.SelMachine
nType = DirectCast(Machine, MyMachine).nType nType = DirectCast(Machine, MyMachine).nType
Else Else
@@ -709,7 +709,7 @@ Public Class ProjManagerVM
If nType = BWType.WALL AndAlso (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE) Then If nType = BWType.WALL AndAlso (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE) Then
' ruoto le pareti di 180 per raddrizzarle rispetto alla vista ' ruoto le pareti di 180 per raddrizzarle rispetto alla vista
For Each Wall In Map.refProjectVM.BTLStructureVM.BTLPartVMList For Each Wall In Map.refProjectVM.BTLStructureVM.BTLPartVMList
Wall.Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, 180, False) Wall.Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, True, 180, False)
Next Next
End If End If
' calcolo volumi pezzi ' calcolo volumi pezzi
@@ -1270,7 +1270,7 @@ Public Class ProjManagerVM
' se progetto pareti e vista ruotata ' se progetto pareti e vista ruotata
If nType = BWType.WALL AndAlso (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE) Then If nType = BWType.WALL AndAlso (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE) Then
' ruoto le pareti di 180 per raddrizzarle rispetto alla vista ' ruoto le pareti di 180 per raddrizzarle rispetto alla vista
AddedBTLPart.Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, 180, False) AddedBTLPart.Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, True, 180, False)
End If End If
' verifico se aggiungere sezione alla lista ' verifico se aggiungere sezione alla lista
If Not Map.refProjectVM.BTLStructureVM.SectionList.Contains(AddedBTLPart.Section) Then If Not Map.refProjectVM.BTLStructureVM.SectionList.Contains(AddedBTLPart.Section) Then
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

@@ -3,6 +3,7 @@ Imports System.ComponentModel
Imports System.IO Imports System.IO
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Public Class SetUpVM Public Class SetUpVM
Inherits VMBase Inherits VMBase
@@ -9,6 +9,7 @@
Style="{StaticResource ToolBar_EgtFloatingPanel}"> Style="{StaticResource ToolBar_EgtFloatingPanel}">
<Border BorderThickness="2" <Border BorderThickness="2"
ToolTip="{Binding TotalTime_ToolTip}"
BorderBrush="Crimson" BorderBrush="Crimson"
Background="{StaticResource Omag_LightGray}" Background="{StaticResource Omag_LightGray}"
Padding="5,0,5,0" Padding="5,0,5,0"
@@ -21,6 +22,7 @@
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
</Border> </Border>
<Border BorderThickness="2" <Border BorderThickness="2"
ToolTip="{Binding TotalTime_ToolTip}"
BorderBrush="Crimson" BorderBrush="Crimson"
Background="{StaticResource Omag_LightGray}" Background="{StaticResource Omag_LightGray}"
Padding="5,0,5,0" Padding="5,0,5,0"
@@ -33,6 +35,7 @@
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
</Border> </Border>
<Border BorderThickness="2" <Border BorderThickness="2"
ToolTip="{Binding DoneTime_ToolTip}"
BorderBrush="Gold" BorderBrush="Gold"
Padding="5,0,5,0" Padding="5,0,5,0"
Margin="2" Margin="2"
@@ -44,6 +47,7 @@
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
</Border> </Border>
<Border BorderThickness="2" <Border BorderThickness="2"
ToolTip="{Binding RemainingTime_ToolTip}"
BorderBrush="White" BorderBrush="White"
Padding="5,0,5,0" Padding="5,0,5,0"
Margin="2" Margin="2"
@@ -23,6 +23,24 @@ Public Class StatisticsTimePanelVM
#Region "ToolTip" #Region "ToolTip"
Public ReadOnly Property TotalTime_ToolTip As String
Get
Return EgtMsg(61978)
End Get
End Property
Public ReadOnly Property DoneTime_ToolTip As String
Get
Return EgtMsg(61979)
End Get
End Property
Public ReadOnly Property RemainingTime_ToolTip As String
Get
Return EgtMsg(61980)
End Get
End Property
#End Region ' ToolTip #End Region ' ToolTip
#End Region ' Fields & Properties #End Region ' Fields & Properties
@@ -4,7 +4,7 @@ Imports System.Reflection
Imports System.IO Imports System.IO
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgtBEAMWALL.Core.ConstGen Imports EgtBEAMWALL.Core
Public Class MyToolDbWindowVM Public Class MyToolDbWindowVM
Inherits ToolDbWindowVM Inherits ToolDbWindowVM
@@ -58,6 +58,12 @@
Style="{StaticResource LeftPanel_Button}"> Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/TopPanel/RemoveRawPart.png" Stretch="Uniform"/> <Image Source="/Resources/TopPanel/RemoveRawPart.png" Stretch="Uniform"/>
</Button> </Button>
<Button Command="{Binding RemoveAllRawPart_Command}"
ToolTip="{Binding RemoveAllRawPart_ToolTip}"
IsEnabled="{Binding TopPanel_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/TopPanel/RemoveAllRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding MovePartInRawPart_Command}" <Button Command="{Binding MovePartInRawPart_Command}"
ToolTip="{Binding MovePartInRawPart_ToolTip}" ToolTip="{Binding MovePartInRawPart_ToolTip}"
IsEnabled="{Binding TopPanel_IsEnabled}" IsEnabled="{Binding TopPanel_IsEnabled}"
@@ -80,6 +80,7 @@ Public Class TopPanelVM
Private m_cmdProduceRawPart As ICommand Private m_cmdProduceRawPart As ICommand
Private m_cmdCopyRawPart As ICommand Private m_cmdCopyRawPart As ICommand
Private m_cmdRemoveRawPart As ICommand Private m_cmdRemoveRawPart As ICommand
Private m_cmdRemoveAllRawPart As ICommand
Private m_cmdRemovePart As ICommand Private m_cmdRemovePart As ICommand
Private m_cmdMoveUpPart As ICommand Private m_cmdMoveUpPart As ICommand
Private m_cmdMoveDownPart As ICommand Private m_cmdMoveDownPart As ICommand
@@ -127,6 +128,12 @@ Public Class TopPanelVM
End Get End Get
End Property End Property
Public ReadOnly Property RemoveAllRawPart_ToolTip As String
Get
Return EgtMsg(61976)
End Get
End Property
Public ReadOnly Property ReOrderPart_ToolTip As String Public ReadOnly Property ReOrderPart_ToolTip As String
Get Get
Return EgtMsg(61916) Return EgtMsg(61916)
@@ -292,7 +299,7 @@ Public Class TopPanelVM
Public Sub ProduceAllRawPart() Public Sub ProduceAllRawPart()
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
' se attiva opzione e non ancora calcolato ' se attiva opzione e non ancora calcolato
If GetMainPrivateProfileInt(S_GENERAL, K_FASTPRODUCE, 0) = 1 And Map.refMachGroupPanelVM.MachGroupVMList.Any(Function(x As MyMachGroupVM) x.nGlobalState = CalcStates.NOTCALCULATED) Then If GetMainPrivateProfileInt(S_GENERAL, K_FASTPRODUCE, 0) = 1 And Map.refMachGroupPanelVM.MachGroupVMList.Any(Function(x As MyMachGroupVM) x.nProduction_State = ItemState.ND AndAlso x.nGlobalState = CalcStates.NOTCALCULATED) Then
Map.refCALCPanelVM.SetFromProduce(CALCPanelVM.ProduceType.PRODUCEALL) Map.refCALCPanelVM.SetFromProduce(CALCPanelVM.ProduceType.PRODUCEALL)
Map.refCALCPanelVM.VerifyAll() Map.refCALCPanelVM.VerifyAll()
Return Return
@@ -365,7 +372,7 @@ Public Class TopPanelVM
Public ReadOnly Property RemoveRawPart_Command As ICommand Public ReadOnly Property RemoveRawPart_Command As ICommand
Get Get
If m_cmdRemoveRawPart Is Nothing Then If m_cmdRemoveRawPart Is Nothing Then
m_cmdRemoveRawPart = New Command(AddressOf RemoveRawPart) m_cmdRemoveRawPart = New Command(AddressOf RemoveRawPartCmd)
End If End If
Return m_cmdRemoveRawPart Return m_cmdRemoveRawPart
End Get End Get
@@ -374,10 +381,14 @@ Public Class TopPanelVM
''' <summary> ''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand. ''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary> ''' </summary>
Public Sub RemoveRawPart() Public Sub RemoveRawPartCmd()
RemoveRawPart()
End Sub
Public Sub RemoveRawPart(Optional bAll As Boolean = False)
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
' se premuto shift ' se premuto shift
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then If bAll Then
' cancello tutti ' cancello tutti
For Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1 For Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index) Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
@@ -400,6 +411,29 @@ Public Class TopPanelVM
#End Region ' RemoveRawPart #End Region ' RemoveRawPart
#Region "RemoveAllRawPart"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property RemoveAllRawPart_Command As ICommand
Get
If m_cmdRemoveAllRawPart Is Nothing Then
m_cmdRemoveAllRawPart = New Command(AddressOf RemoveAllRawPart)
End If
Return m_cmdRemoveAllRawPart
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub RemoveAllRawPart()
RemoveRawPart(True)
End Sub
#End Region ' RemoveRawPart
#Region "RemovePart" #Region "RemovePart"
''' <summary> ''' <summary>
@@ -179,8 +179,8 @@ Public Module CurrentMachine
' crea l'elenco dei parametri della macchina corrente ' crea l'elenco dei parametri della macchina corrente
CreateMachParams() CreateMachParams()
' leggo parametri macchina da WallData ' leggo parametri macchina da BeamData
If nType = MachineType.BEAM Then If nType = MachineType.BEAM OrElse nType = MachineType.BOTH Then
' Assegno i dati ' Assegno i dati
EgtLuaCreateGlobTable("GWD") EgtLuaCreateGlobTable("GWD")
EgtLuaSetGlobStringVar("GWD.BASEDIR", Map.refMainWindowVM.MainWindowM.sBeamRoot) EgtLuaSetGlobStringVar("GWD.BASEDIR", Map.refMainWindowVM.MainWindowM.sBeamRoot)
@@ -200,7 +200,7 @@ Public Module CurrentMachine
End If End If
If bOk Then If bOk Then
EgtLuaGetGlobNumVar("GWD.OVM_MID", m_dMinOffset) EgtLuaGetGlobNumVar("GWD.OVM_MID", m_dMinOffset)
Dim nTemp As Integer Dim nTemp As Integer = 0
EgtLuaGetGlobIntVar("GWD.SIMUL_VIEW_DIR", nTemp) EgtLuaGetGlobIntVar("GWD.SIMUL_VIEW_DIR", nTemp)
Select Case nTemp Select Case nTemp
Case 0 Case 0
@@ -222,8 +222,9 @@ Public Module CurrentMachine
EgtLuaResetGlobVar("GWD") EgtLuaResetGlobVar("GWD")
' aggiorno parametro in gestore viste ' aggiorno parametro in gestore viste
Core.ViewPanelVM.UpdateMachParam(m_nViewDir) Core.ViewPanelVM.UpdateMachParam(m_nViewDir)
End If
If nType = MachineType.WALL Then ' leggo parametri macchina da WallData
ElseIf nType = MachineType.WALL Then
' Assegno i dati ' Assegno i dati
EgtLuaCreateGlobTable("GWD") EgtLuaCreateGlobTable("GWD")
EgtLuaSetGlobStringVar("GWD.BASEDIR", Map.refMainWindowVM.MainWindowM.sWallRoot) EgtLuaSetGlobStringVar("GWD.BASEDIR", Map.refMainWindowVM.MainWindowM.sWallRoot)
@@ -243,9 +244,11 @@ Public Module CurrentMachine
End If End If
If bOk Then If bOk Then
EgtLuaGetGlobIntVar("GWD.HOR_DRILL_DIAM", m_dHorDrillDiam) EgtLuaGetGlobIntVar("GWD.HOR_DRILL_DIAM", m_dHorDrillDiam)
Dim nTemp As Integer Dim nTemp As Integer = 0
EgtLuaGetGlobIntVar("GWD.SIMUL_VIEW_DIR", nTemp) EgtLuaGetGlobIntVar("GWD.SIMUL_VIEW_DIR", nTemp)
Select Case nTemp Select Case nTemp
Case 0
m_nViewDir = VT.ISO_SW
Case 1 Case 1
m_nViewDir = VT.ISO_NW m_nViewDir = VT.ISO_NW
Case 2 Case 2
@@ -63,11 +63,12 @@ Public Module DbControllers
WriteMainPrivateProfileString(S_GENERAL, K_DBMASTERKEY, nKey) WriteMainPrivateProfileString(S_GENERAL, K_DBMASTERKEY, nKey)
End If End If
End If End If
DataLayer.DbConfig.InitDb(DbAddress, sUser, sPwd, sDbMasterKey) DataLayer.DbConfig.InitDb(DbAddress, sUser, sPwd, sDbMasterKey)
DataLayer.DbConfig.SetupLogDir(Map.refMainWindowVM.MainWindowM.sTempDir) DataLayer.DbConfig.SetupLogDir(Map.refMainWindowVM.MainWindowM.sTempDir)
DataLayer.DbConfig.CheckMigrateDb() DataLayer.DbConfig.CheckMigrateDb()
DataLayer.DbConfig.CheckUser(sUser, sPwd, Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK)) DataLayer.DbConfig.CheckUser(sUser, sPwd, m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK))
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) And bNetwork Then DataLayer.DbConfig.CheckViews(sUser, sPwd)
If m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
' imposto cartella condivisa ' imposto cartella condivisa
GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataDir, sSharedFolder) GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataDir, sSharedFolder)
Map.refMainWindowVM.MainWindowM.UpdatePathForNetwork(sSharedFolder) Map.refMainWindowVM.MainWindowM.UpdatePathForNetwork(sSharedFolder)
@@ -383,7 +383,7 @@
<Setter Property="Margin" Value="5"/> <Setter Property="Margin" Value="5"/>
</Style> </Style>
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}"> <Style x:Key="FreeContour_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="Height" Value="22"/> <Setter Property="Height" Value="22"/>
<Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Right"/> <Setter Property="HorizontalContentAlignment" Value="Right"/>
@@ -4,7 +4,7 @@ Public Class PartsObservableCollection(Of T)
Inherits ObservableCollection(Of T) Inherits ObservableCollection(Of T)
Public Sub AddToList(item As T) Public Sub AddToList(item As T)
If Contains(item) Then Return If IsNothing(item) OrElse Contains(item) Then Return
Add(item) Add(item)
End Sub End Sub
@@ -250,4 +250,85 @@ Module WarehouseHelper
SectXMat.dW >= 0 SectXMat.dW >= 0
End Function End Function
Friend Function GetLastMaterial(SectXMat As SectionXMaterial) As SParam
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
'If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
' Dim ParamIndex As Integer = 1
' Dim sSxMValue As String = ""
' While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, ParamIndex, String.Empty, sSxMValue, sWarehousePath) > 0
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
' ' creo parametro
' Dim dW As Double = 0
' Dim dH As Double = 0
' Dim sMaterial As String = sSectXMatValues(2)
' StringToLen(sSectXMatValues(0), dW)
' StringToLen(sSectXMatValues(1), dH)
' If SectXMat.dW = dW AndAlso SectXMat.dH = dH AndAlso SectXMat.sMaterial(0) = sMaterial Then
' If sSectXMatValues.Length <= 3 Then Return Nothing
' Dim sValue As String = ""
' If EgtUILib.GetPrivateProfileString(S_BEAM, "L" & sSectXMatValues(3), String.Empty, sValue, sWarehousePath) Then
' End If
' End If
' End While
' If EgtUILib.GetPrivateProfileString(S_BEAM, "L" & ParamIndex, String.Empty, sValue, sWarehousePath) Then
' Dim sParamValues() As String = sValue.Split(","c)
' ' verifico numero minimo di parametri
' If sParamValues.Count < 2 Then Return Nothing
' ' cancello spazi
' For Index = 0 To sParamValues.Count - 1
' sParamValues(Index) = sParamValues(Index).Trim()
' Next
' ' ricavo SectionXMaterial tramite Beam_List
' If EgtUILib.GetPrivateProfileString(S_BEAM_LIST, sParamValues(0), String.Empty, sSxMValue, sWarehousePath) Then
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
' ' creo parametro
' Dim dW As Double = 0
' Dim dH As Double = 0
' Dim dL As Double = 0
' Dim nQty As Integer = 0
' Dim nActive As Integer = 1
' StringToLen(sSectXMatValues(0), dW)
' StringToLen(sSectXMatValues(1), dH)
' StringToLen(sParamValues(1), dL)
' If sParamValues.Count >= 3 Then Integer.TryParse(sParamValues(2), nQty)
' If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nActive)
' Return New SParam(New SectionXMaterial(dW, dH, dL, sSectXMatValues(2)), dL, nQty, nActive > 0)
' End If
' End If
'ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
' If EgtUILib.GetPrivateProfileString(S_WALL, "S" & ParamIndex, String.Empty, sValue, sWarehousePath) Then
' Dim sParamValues() As String = sValue.Split(","c)
' ' verifico numero minimo di parametri
' If sParamValues.Count >= 3 Then
' ' cancello spazi
' For Index = 0 To sParamValues.Count - 1
' sParamValues(Index) = sParamValues(Index).Trim()
' Next
' ' ricavo SectionXMaterial tramite Wall_List
' If EgtUILib.GetPrivateProfileString(S_WALL_LIST, sParamValues(0), String.Empty, sSxMValue, sWarehousePath) Then
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
' ' creo parametro
' Dim dH As Double = 0
' Dim dW As Double = 0
' Dim dL As Double = 0
' Dim nQty As Integer = 0
' Dim nActive As Integer = 1
' StringToLen(sSectXMatValues(0), dH)
' StringToLen(sParamValues(1), dW)
' StringToLen(sParamValues(2), dL)
' If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nQty)
' If sParamValues.Count >= 5 Then Integer.TryParse(sParamValues(4), nActive)
' Return New SParam(New SectionXMaterial(dW, dH, dL, sSectXMatValues(1)), dW, dL, nQty, nActive > 0)
' End If
' End If
' End If
'End If
End Function
End Module End Module
@@ -1084,7 +1084,9 @@ Public Class WarehouseWndVM
Dim dH As Double = 0 Dim dH As Double = 0
StringToLen(sSectXMatValues(0), dW) StringToLen(sSectXMatValues(0), dW)
StringToLen(sSectXMatValues(1), dH) StringToLen(sSectXMatValues(1), dH)
SectXMatList.Add(New SectionXMaterial(dW, dH, 0, sSectXMatValues(2))) If Not SectXMatList.Any(Function(x) x.dW = dW AndAlso x.dH = dH AndAlso x.sMaterial(0) = sSectXMatValues(2)) Then
SectXMatList.Add(New SectionXMaterial(dW, dH, 0, sSectXMatValues(2)))
End If
sSectXMatIndex += 1 sSectXMatIndex += 1
End While End While
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
+79
View File
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config.
Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
Binary file not shown.
Binary file not shown.
Binary file not shown.
-389
View File
@@ -1,389 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>MySql.Data.Entity.EF6</name>
</assembly>
<members>
<member name="T:MySql.Data.Entity.SqlFragmentVisitor">
<summary>
Visitor for SqlFragment and derived classes, useful for postprocessing and optimizations.
</summary>
</member>
<member name="T:MySql.Data.Entity.ReplaceTableNameVisitor">
<summary>
Visitor to replace old table names with new table names. Used as part postprocessing of the code for fusing nested selects.
</summary>
</member>
<member name="T:MySql.Data.Entity.OpType">
<summary>
Specifies the operation types supported.
</summary>
</member>
<member name="M:MySql.Data.Entity.SelectGenerator.TryFlatteningGroupBy(MySql.Data.Entity.SqlFragment)">
<summary>
If input sqlFragment is a group by structure, is flattened to remove some nested correlation queries.
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:MySql.Data.Entity.SqlGenerator.TryFusingSelect(MySql.Data.Entity.InputFragment)">
<summary>
If current fragment is select and its from clause is another select, try fuse the inner select with the outer select.
(Thus removing a nested query, which may have bad performance in Mysql).
</summary>
<param name="f">The fragment to probe and posibly optimize</param>
<returns>The fragment fused, or the original one.</returns>
</member>
<member name="M:MySql.Data.Entity.SqlGenerator.TryPromoteToLike(System.Data.Entity.Core.Common.CommandTrees.DbExpression,System.Data.Entity.Core.Common.CommandTrees.DbExpression,System.String)">
<summary>
Examines a binary expression to see if it is an special case suitable to conversion
to a more efficient and equivalent LIKE sql expression.
</summary>
<param name="left"></param>
<param name="right"></param>
<param name="op"></param>
<returns></returns>
</member>
<member name="T:MySql.Data.Entity.MySqlConnectionFactory">
<summary>
Used for creating connections in Code First 4.3.
</summary>
</member>
<member name="T:MySql.Data.Entity.MySqlDependencyResolver">
<summary>
Provides the capability to resolve a dependency.
</summary>
</member>
<member name="M:MySql.Data.Entity.MySqlDependencyResolver.GetService(System.Type,System.Object)">
<summary>
Attempts to resolve a dependency for a given contract type and optionally a given key.
</summary>
<param name="type">The base class that defines the dependency to be resolved.</param>
<param name="key">Optionally, the key of the dependency to be resolved.</param>
<returns>The resolved dependency.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlDependencyResolver.GetServices(System.Type,System.Object)">
<summary>
Attempts to resolve a dependency for all of the registered services with the given type and key combination.
</summary>
<param name="type">The base class that defines the dependency to be resolved.</param>
<param name="key">Optionally, the key of the dependency to be resolved.</param>
<returns>All services that resolve the dependency.</returns>
</member>
<member name="T:MySql.Data.Entity.MySqlProviderInvariantName">
<summary>
Used to resolve a provider invariant name from a provider factory.
</summary>
</member>
<member name="P:MySql.Data.Entity.MySqlProviderInvariantName.Name">
<summary>
Gets the name of the provider.
</summary>
</member>
<member name="P:MySql.Data.Entity.MySqlProviderInvariantName.ProviderName">
<summary>
Gets the name of the provider.
</summary>
</member>
<member name="T:MySql.Data.Entity.MySqlProviderFactoryResolver">
<summary>
Service that obtains the provider factory from a given connection.
</summary>
</member>
<member name="M:MySql.Data.Entity.MySqlProviderFactoryResolver.ResolveProviderFactory(System.Data.Common.DbConnection)">
<summary>
Returns the <see cref="T:System.Data.Common.DbProviderFactory"/> for the given connection.
</summary>
<param name="connection">The database connection.</param>
<returns>The provider factory for the connection.</returns>
</member>
<member name="T:MySql.Data.Entity.MySqlManifestTokenResolver">
<summary>
Gets a provider manifest token for the given connection.
</summary>
</member>
<member name="M:MySql.Data.Entity.MySqlManifestTokenResolver.ResolveManifestToken(System.Data.Common.DbConnection)">
<summary>
Returns the manifest token to use for the given connection.
</summary>
<param name="connection">The connection for which a manifest token is required.</param>
<returns>The manifest token to use.</returns>
</member>
<member name="T:MySql.Data.Entity.MySqlModelCacheKey">
<summary>
Represents a key value that uniquely identifies an Entity Framework model that has been loaded into memory.
</summary>
</member>
<member name="M:MySql.Data.Entity.MySqlModelCacheKey.Equals(System.Object)">
<summary>
Determines whether the current cached model key is equal to the specified cached
model key.
</summary>
<param name="other">The cached model key to compare to the current cached model key.</param>
<returns><c>true</c> if the current cached model key is equal to the specified cached model key;
otherwise, <c>false</c>.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlModelCacheKey.GetHashCode">
<summary>
Returns the hash function for this cached model key.
</summary>
<returns>The hash function for this cached model key.</returns>
</member>
<member name="T:MySql.Data.Entity.MySqlEFConfiguration">
<summary>
Defines the configuration of an application to be used with Entity Framework.
</summary>
</member>
<member name="M:MySql.Data.Entity.MySqlEFConfiguration.#ctor">
<summary>
Initializes a new instance of <see cref="T:MySql.Data.Entity.MySqlEFConfiguration"/> class.
</summary>
</member>
<member name="T:MySql.Data.Entity.MySqlExecutionStrategy">
<summary>
An execution strategy tailored for handling MySql Server transient errors.
</summary>
</member>
<member name="F:MySql.Data.Entity.MySqlExecutionStrategy.errorsToRetryOn">
<summary>
Different back off algorithms used for different errors.
</summary>
</member>
<member name="T:MySql.Data.Entity.BackoffAlgorithm">
<summary>
The base class for backoff algorithms.
</summary>
<remarks>Different transient error conditions require different approaches.</remarks>
</member>
<member name="M:MySql.Data.Entity.BackoffAlgorithm.GetNextDelay">
<summary>
The default implementation is an exponential delay backoff.
</summary>
<returns></returns>
</member>
<member name="M:MySql.Data.Entity.BackoffAlgorithm.Reset">
<summary>
Resets a backoff algorithm, so they can be reused.
</summary>
</member>
<member name="T:MySql.Data.Entity.BackoffAlgorithmErr1040">
<summary>
Back-off algorithm customized for the MySql error code 1040 - Too many connections.
</summary>
</member>
<member name="T:MySql.Data.Entity.BackoffAlgorithmErr1614">
<summary>
Back-off algorithm for the Mysql error code 1614 - Transaction branch was rolled back: deadlock was detected.
</summary>
</member>
<member name="T:MySql.Data.Entity.BackoffAlgorithmErr1205">
<summary>
Back-off algorithm customized for the MySql error code 1205 - Lock wait timeout exceeded; try restarting transaction.
</summary>
</member>
<member name="T:MySql.Data.Entity.BackoffAlgorithmErr1213">
<summary>
Back-off algorithm customized for MySql error code 1213 - Deadlock found when trying to get lock; try restarting transaction.
</summary>
</member>
<member name="T:MySql.Data.Entity.BackoffAlgorithmErr2006">
<summary>
Back-off algorithm customized for MySql error code 2006 - MySQL server has gone away.
</summary>
</member>
<member name="T:MySql.Data.Entity.BackoffAlgorithmErr2013">
<summary>
Back-off algorithm customized for MySql error code 2013 - Lost connection to MySQL server during query.
</summary>
</member>
<member name="T:MySql.Data.Entity.BackoffAlgorithmNdb">
<summary>
Back-off algorithm customized for MySql Cluster (NDB) errors.
</summary>
</member>
<member name="T:MySql.Data.Entity.MySqlHistoryContext">
<summary>
Reads and writes migration history from the database during code first migrations.
</summary>
</member>
<member name="T:MySql.Data.Entity.MySqlLogger">
<summary>
Enables the creation of MySQL logs for applications.
</summary>
</member>
<member name="T:MySql.Data.Entity.MySqlMigrationCodeGenerator">
<summary>
Class used to customized code generation
to avoid dbo. prefix added on table names.
</summary>
</member>
<member name="T:MySql.Data.Entity.MySqlMigrationSqlGenerator">
<summary>
Implementation of a MySql's Sql generator for EF 4.3 data migrations.
</summary>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.AddColumnOperation)">
<summary>
Generates a migration operation to add a column.
</summary>
<param name="op">The operation that represents a column being added to a table.</param>
<returns>A migration operation to add a column.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.DropColumnOperation)">
<summary>
Generates a migration operation to drop a column.
</summary>
<param name="op">The operation that represents a column being dropped from a table.</param>
<returns>The migration operation to drop a column.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.AlterColumnOperation)">
<summary>
Generates a migration operation to alter a column.
</summary>
<param name="op">The operation that represents altering an existing column.</param>
<returns>A migration operation to alter a column.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.RenameColumnOperation)">
<summary>
Generates a migration operation to rename a column.
</summary>
<param name="op">The operation that represents a column being renamed.</param>
<returns>A migration operation to rename a column.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.AddForeignKeyOperation)">
<summary>
Generates a migration operation to add a foreign key.
</summary>
<param name="op">the operation that represents a foreing key constraint being added to a table.</param>
<returns>A migration operation to add a foreign key constraint.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.ColumnModel)">
<summary>
Generates an SQL statement of a column model.
</summary>
<param name="op">The model that represents a column.</param>
<returns>A string containing an SQL statement of a column model.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.DropForeignKeyOperation)">
<summary>
Generates a migration operation to drop a foreign key constraint from a table.
</summary>
<param name="op">The operation that represents a foreign key being added from a table.</param>
<returns>A migration operation to drop a foreign key.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.CreateIndexOperation)">
<summary>
Generates a migration operation to create a database index.
</summary>
<param name="op">The operation that represents creating a database index.</param>
<returns>A migration operation to create a database index.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.DropIndexOperation)">
<summary>
Generates a migration operation to drop an existing database index.
</summary>
<param name="op">The operation that represents dropping am existing database index.</param>
<returns>A migration operation to drop an existing database index.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.CreateTableOperation)">
<summary>
Generates a migration operation to create a table.
</summary>
<param name="op">The operation that represents creating a table.</param>
<returns>A migration operation to create a table.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.DropTableOperation)">
<summary>
Generates a migration operation to drop an existing table.
</summary>
<param name="op">The operation that represents dropping an existing table.</param>
<returns>A migration operation to drop an existing table.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.AddPrimaryKeyOperation)">
<summary>
Generates a migration operation to add a primary key to a table.
</summary>
<param name="op">The operation that represents adding a primary key to a table.</param>
<returns>A migration operation to add a primary key to a table.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.DropPrimaryKeyOperation)">
<summary>
Generates a migration operation to drpo an existing primary key.
</summary>
<param name="op">The operation that represents dropping an existing primary key.</param>
<returns>A migration operation to drop an existing primary key.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.RenameTableOperation)">
<summary>
Generates a migration operation to rename an existing table.
</summary>
<param name="op">The operation that represents renaming an existing table.</param>
<returns>A migration operation to rename an existing table.</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.MoveTableOperation)">
<summary>
Not implemented yet.
</summary>
<param name="op">NA</param>
<returns>NA</returns>
</member>
<member name="M:MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.SqlOperation)">
<summary>
Generates a migration operation with a MySQL statement to be executed.
</summary>
<param name="op">The operation representing a MySQL statement to be executed directly against the database.</param>
<returns>A migration operation with a MySQL statement to be executed.</returns>
</member>
<member name="T:MySql.Data.Entity.Properties.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:MySql.Data.Entity.Properties.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:MySql.Data.Entity.Properties.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="P:MySql.Data.Entity.Properties.Resources.ConnectionMustBeOfTypeMySqlConnection">
<summary>
Looks up a localized string similar to The connection parameter must reference an object of type MySql.Data.MySqlConnection.
</summary>
</member>
<member name="P:MySql.Data.Entity.Properties.Resources.NoStoreTypeForEdmType">
<summary>
Looks up a localized string similar to There is no store type corresponding to the EDM type &apos;{0}&apos; of primitive type &apos;{1}&apos;..
</summary>
</member>
<member name="P:MySql.Data.Entity.Properties.Resources.TypeNotSupported">
<summary>
Looks up a localized string similar to The underlying provider does not support the type &apos;{0}&apos;..
</summary>
</member>
<member name="P:MySql.Data.Entity.Properties.Resources.WrongFunctionResultType">
<summary>
Looks up a localized string similar to Result type of a function is expected to be a collection of RowType or PrimitiveType.
</summary>
</member>
<member name="M:MySql.Data.MySqlClient.MySqlProviderServices.SetExpectedTypes(System.Data.Entity.Core.Common.CommandTrees.DbCommandTree,MySql.Data.Entity.EFMySqlCommand)">
<summary>
Sets the expected column types
</summary>
</member>
<member name="M:MySql.Data.MySqlClient.MySqlProviderServices.SetQueryExpectedTypes(System.Data.Entity.Core.Common.CommandTrees.DbQueryCommandTree,MySql.Data.Entity.EFMySqlCommand)">
<summary>
Sets the expected column types for a given query command tree
</summary>
</member>
<member name="M:MySql.Data.MySqlClient.MySqlProviderServices.SetFunctionExpectedTypes(System.Data.Entity.Core.Common.CommandTrees.DbFunctionCommandTree,MySql.Data.Entity.EFMySqlCommand)">
<summary>
Sets the expected column types for a given function command tree
</summary>
</member>
</members>
</doc>