81 lines
2.5 KiB
VB.net
81 lines
2.5 KiB
VB.net
Imports NKC_SDK
|
|
Imports SteamWare
|
|
|
|
|
|
Public Class Form1
|
|
|
|
' caricamento del NEXT STACK da redis (come oggetto)
|
|
' PROD http : http://seriate.steamware.net:8083/NKC/
|
|
' DEV: https : http://localhost:44388/
|
|
Dim baseUrl As String = "http://seriate.steamware.net:8083/NKC/"
|
|
Dim currNKC As NKC = New NKC(baseUrl)
|
|
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
|
' invio notifica che c'è una busta da processare
|
|
Dim redKey = $"PROVA:CURR"
|
|
' scrivo su REDIS
|
|
memLayer.ML.setRSV(redKey, "ciao " & DateTime.Now.ToString())
|
|
'ComLib.sendMaterials()
|
|
Label1.Text = memLayer.ML.getRSV(redKey)
|
|
'Dim x As New Takt
|
|
'x = readTakt("PROD", "20190821.1")
|
|
'x.StackList(0).PanelsList(0).Printing()
|
|
'Dim d = memLayer.ML.connRedis.Configure.
|
|
'Dim h = memLayer.ML.connRedis
|
|
End Sub
|
|
|
|
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
|
|
|
' recupero BUNK!
|
|
Dim getFirstBunk = currNKC.getFirstBunk
|
|
|
|
'' chiamata diretta redis + DB
|
|
'Dim getFirstBunk = ComLib.prodGetFirstBunk()
|
|
' ho un bunk coi suoi pannelli...
|
|
|
|
Label1.Text = $"Trovato il bunk {getFirstBunk.BunkId} costituito da {getFirstBunk.SheetList.Count} pannelli"
|
|
|
|
' salvo bunk corrente
|
|
txtCurrBunk.Text = getFirstBunk.BunkId
|
|
|
|
' visualizzo btn nextBunk
|
|
btnNextBunk.Visible = True
|
|
lblNextBunk.Visible = True
|
|
lblNextBunk.Text = "..."
|
|
|
|
End Sub
|
|
|
|
Private Sub cmbSheet_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbSheet.SelectedIndexChanged
|
|
' selezione cambiata su elenco sheet (dal primo all'ultimo a runtime OBBLIGATORIO)
|
|
|
|
End Sub
|
|
|
|
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
|
' iniziato paint x sheet selezionato
|
|
|
|
End Sub
|
|
|
|
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
|
' completato paint x sheet selezionato
|
|
End Sub
|
|
|
|
Private Sub btnNextBunk_Click(sender As Object, e As EventArgs) Handles btnNextBunk.Click
|
|
' carico nextBunk
|
|
Dim bunkId As Integer
|
|
bunkId = 0
|
|
Integer.TryParse(txtCurrBunk.Text, bunkId)
|
|
'' con com lib diretta...
|
|
'Dim nextBunk = ComLib.prodGetNextBunk(bunkId)
|
|
|
|
Dim nextBunk = currNKC.getNextBunk(bunkId)
|
|
|
|
' mostro risultato...
|
|
If Not IsNothing(nextBunk) Then
|
|
lblNextBunk.Text = nextBunk.BunkId
|
|
Else
|
|
lblNextBunk.Text = "none"
|
|
End If
|
|
|
|
End Sub
|
|
End Class
|