2024-05-06 13:38:52 +02:00

34 lines
1.0 KiB
VB.net

Public Class frmNewNode
Public Property Title As String
Public Property Id As Integer
Public Property NodeConfigTypes As New List(Of NodeConfig)
Public Class NodeConfig
Public Property Id
Public Property Name
Public Overrides Function ToString() As String
Return Name
End Function
End Class
Private Sub frmNewNode_Load(sender As Object, e As EventArgs) Handles MyBase.Load
cmbNodeConfig.Properties.Items.AddRange(NodeConfigTypes)
cmbNodeConfig.SelectedIndex = 0
End Sub
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles btnOK.Click
Try
Dim oSelectedNodeConfig As NodeConfig = cmbNodeConfig.EditValue
If Not IsNothing(oSelectedNodeConfig) Then
Id = oSelectedNodeConfig.Id
Title = TextEdit1.EditValue
DialogResult = DialogResult.OK
Else
End If
Catch ex As Exception
End Try
End Sub
End Class