TestEIn 1.6u5 :
- aggiornamento.
This commit is contained in:
+25
-13
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user