TestEIn 1.6u5 :

- aggiornamento.
This commit is contained in:
Dario Sassi
2016-09-26 14:40:48 +00:00
parent 419763d56f
commit 1dfa30a125
7 changed files with 227 additions and 89 deletions
+25 -13
View File
@@ -4,23 +4,35 @@ Imports TestEIn.EgtInterface
Public Class SelectMulti
Dim m_vId As List(Of Integer)
Dim m_nCurrEnt As Integer
Public Sub New(vId As List(Of Integer))
' This call is required by the designer.
InitializeComponent()
' Assegno la lista di Id
m_vId = vId
End Sub
Private Sub SelectMulti_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
ListBox1.BeginUpdate()
'Inserisco le entità nel mirino
Dim nId = EgtGetFirstObjInSelWin()
While nId <> GDB_ID.NULL
Dim sTitle As String = String.Empty
EgtGetTitle(nId, sTitle)
If EgtIsSelectedObj(nId) Then
sTitle += "*"
End If
sTitle += " (" & nId & ")"
Dim smItem As New SelMulItem(sTitle, nId)
ListBox1.Items.Add(smItem)
nId = EgtGetNextObjInSelWin()
End While
' Inserisco le entità della lista
If Not IsNothing(m_vId) Then
For Each nId As Integer In m_vId
Dim bSel As Boolean = EgtIsSelectedObj(nId)
Dim sTitle As String = String.Empty
EgtGetTitle(nId, sTitle)
Dim sText As String = String.Empty
Dim sName As String = String.Empty
If EgtGetName(nId, sName) Then
sText = sName & If(bSel, "* (", " (") & sTitle & " " + nId.ToString & ")"
Else
sText = sTitle & If(bSel, "* ", " ") & nId.ToString
End If
Dim smItem As New SelMulItem(sText, nId)
ListBox1.Items.Add(smItem)
Next
End If
'Inserisco None per non selezionare alcunchè
Dim smNone As New SelMulItem("None", GDB_ID.NULL)
ListBox1.Items.Add(smNone)