7f031691bb
- aggiunti flag di debug per nascondere grafica di debug - aggiunti bottoni per verificare porte e resettare coda di produzione - aggiunto stato di produzione e tempi a lista porte - aggiunto stato lua a plugin - aggiunta gestione tabella di tabella in alcune funzioni lua - aggiunte funzioni che gestiscono esecuzione sincrona ed asincrona dell' eseguibile - migliorato mainmenu ora funzionante - aggiunta pagina statistiche - aggiunto in pagina macchina disegno macchina con variabili di debug e lista circolare porte
186 lines
5.1 KiB
VB.net
186 lines
5.1 KiB
VB.net
Imports Newtonsoft.Json
|
|
Imports Newtonsoft.Json.Converters
|
|
Imports Supervisor.Plugin.FiveLakes.Door
|
|
|
|
Public Class JsonDoor
|
|
|
|
Private m_nListIndex As Integer
|
|
Public ReadOnly Property nListIndex As Integer
|
|
Get
|
|
Return m_nListIndex
|
|
End Get
|
|
End Property
|
|
|
|
Private m_nId As Integer
|
|
Public ReadOnly Property nId As Integer
|
|
Get
|
|
Return m_nId
|
|
End Get
|
|
End Property
|
|
|
|
Private m_nCSVLine As Integer
|
|
Public ReadOnly Property nCSVLine As Integer
|
|
Get
|
|
Return m_nCSVLine
|
|
End Get
|
|
End Property
|
|
|
|
Private m_sDDFName As String
|
|
Public ReadOnly Property sDDFName As String
|
|
Get
|
|
Return m_sDDFName
|
|
End Get
|
|
End Property
|
|
|
|
Private m_nQuantity As Integer
|
|
Public ReadOnly Property nQuantity As Integer
|
|
Get
|
|
Return m_nQuantity
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dWidth As Double
|
|
Public ReadOnly Property dWidth As Double
|
|
Get
|
|
Return m_dWidth
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dHeight As Double
|
|
Public ReadOnly Property dHeight As Double
|
|
Get
|
|
Return m_dHeight
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dThickness As Double
|
|
Public ReadOnly Property dThickness As Double
|
|
Get
|
|
Return m_dThickness
|
|
End Get
|
|
End Property
|
|
|
|
Private m_sCSVName As String
|
|
Public ReadOnly Property sCSVName As String
|
|
Get
|
|
Return m_sCSVName
|
|
End Get
|
|
End Property
|
|
|
|
Private m_CustomerParameters As New List(Of CustomerParameter)
|
|
Public ReadOnly Property CustomerParameters As List(Of CustomerParameter)
|
|
Get
|
|
Return m_CustomerParameters
|
|
End Get
|
|
End Property
|
|
|
|
Private m_nState As DoorStates = DoorStates.LOADED_FROM_CSV
|
|
<JsonProperty>
|
|
<JsonConverter(GetType(StringEnumConverter))>
|
|
Public ReadOnly Property nState As DoorStates
|
|
Get
|
|
Return m_nState
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Statistics"
|
|
|
|
Private m_nProdState As DoorProdStates = DoorProdStates.NOT_INIT
|
|
<JsonProperty>
|
|
<JsonConverter(GetType(StringEnumConverter))>
|
|
Public ReadOnly Property nProdState As DoorProdStates
|
|
Get
|
|
Return m_nProdState
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dtLoadTime As DateTime = DateTime.MinValue
|
|
Public ReadOnly Property dtLoadTime As DateTime
|
|
Get
|
|
Return m_dtLoadTime
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dtMachining1Start As DateTime = DateTime.MinValue
|
|
Public ReadOnly Property dtMachining1Start As DateTime
|
|
Get
|
|
Return m_dtMachining1Start
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dtMachining1End As DateTime = DateTime.MinValue
|
|
Public ReadOnly Property dtMachining1End As DateTime
|
|
Get
|
|
Return m_dtMachining1End
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dtMachining2Start As DateTime = DateTime.MinValue
|
|
Public ReadOnly Property dtMachining2Start As DateTime
|
|
Get
|
|
Return m_dtMachining2Start
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dtMachining2End As DateTime = DateTime.MinValue
|
|
Public ReadOnly Property dtMachining2End As DateTime
|
|
Get
|
|
Return m_dtMachining2End
|
|
End Get
|
|
End Property
|
|
|
|
Private m_dtUnloadTime As DateTime = DateTime.MinValue
|
|
Public ReadOnly Property dtUnloadTime As DateTime
|
|
Get
|
|
Return m_dtUnloadTime
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Statistics
|
|
|
|
<JsonConstructor>
|
|
Sub New(nListIndex As Integer, nId As Integer, nCSVLine As Integer, sDDFName As String, sCSVName As String, nQuantity As Integer, dWidth As Double, dHeight As Double, dThickness As Double, nState As DoorStates, CustomerParameters As List(Of CustomerParameter),
|
|
nProdState As DoorProdStates, dtLoadTime As DateTime, dtMachining1Start As DateTime, dtMachining1End As DateTime, dtMachining2Start As DateTime, dtMachining2End As DateTime, dtUnloadTime As DateTime)
|
|
m_nListIndex = nListIndex
|
|
m_nId = nId
|
|
m_nCSVLine = nCSVLine
|
|
m_sDDFName = sDDFName
|
|
m_sCSVName = sCSVName
|
|
m_nQuantity = nQuantity
|
|
m_dHeight = dHeight
|
|
m_dWidth = dWidth
|
|
m_dThickness = dThickness
|
|
m_nState = nState
|
|
m_CustomerParameters = CustomerParameters
|
|
m_nProdState = nProdState
|
|
m_dtLoadTime = dtLoadTime
|
|
m_dtMachining1Start = dtMachining1Start
|
|
m_dtMachining1End = dtMachining1End
|
|
m_dtMachining2Start = dtMachining2Start
|
|
m_dtMachining2End = dtMachining2End
|
|
m_dtUnloadTime = dtUnloadTime
|
|
End Sub
|
|
|
|
Sub New(nListIndex As Integer, Door As Door)
|
|
m_nListIndex = nListIndex
|
|
m_nId = Door.nId
|
|
m_nCSVLine = Door.nCSVLine
|
|
m_sDDFName = Door.sDDFName
|
|
m_sCSVName = Door.sCSVName
|
|
m_nQuantity = Door.nQuantity
|
|
m_dHeight = Door.dHeight
|
|
m_dWidth = Door.dWidth
|
|
m_dThickness = Door.dThickness
|
|
m_nState = Door.nState
|
|
m_CustomerParameters = Door.CustomerParameters
|
|
m_nProdState = Door.nProdState
|
|
m_dtLoadTime = Door.dtLoadTime
|
|
m_dtMachining1Start = Door.dtMachining1Start
|
|
m_dtMachining1End = Door.dtMachining1End
|
|
m_dtMachining2Start = Door.dtMachining2Start
|
|
m_dtMachining2End = Door.dtMachining2End
|
|
m_dtUnloadTime = Door.dtUnloadTime
|
|
End Sub
|
|
|
|
End Class
|