From 67f2a1060738a24f29e1983bafe302e06eac4f8d Mon Sep 17 00:00:00 2001 From: ms Date: Thu, 1 Jul 2021 08:39:14 +0200 Subject: [PATCH] DHCP Fix --- Dokumentation/App.config | 20 ++- Dokumentation/Classes/Class1.vb | 9 +- Dokumentation/Classes/DHCP.vb | 17 +- Dokumentation/Dokumentation.vbproj | 7 +- Dokumentation/Main.vb | 151 ++++++++++++++---- Dokumentation/My Project/AssemblyInfo.vb | 8 +- .../My Project/Resources.Designer.vb | 2 +- Dokumentation/My Project/Resources.resx | 2 +- Dokumentation/frmLeer.Designer.vb | 1 + Dokumentation/frmLeer.vb | 5 + Dokumentation/packages.config | 1 + Dokumentation/uscntr_DomUser.Designer.vb | 2 +- Dokumentation/uscntr_DomUserList.Designer.vb | 4 +- Dokumentation/uscntr_DomUserList.vb | 69 +++++++- Dokumentation/uscntr_SendMSG.vb | 1 + 15 files changed, 247 insertions(+), 52 deletions(-) diff --git a/Dokumentation/App.config b/Dokumentation/App.config index a932133..53aa9c6 100644 --- a/Dokumentation/App.config +++ b/Dokumentation/App.config @@ -1,6 +1,22 @@ - + - + + + + + + + + + + + + + + + + + diff --git a/Dokumentation/Classes/Class1.vb b/Dokumentation/Classes/Class1.vb index 52a69fe..fe36368 100644 --- a/Dokumentation/Classes/Class1.vb +++ b/Dokumentation/Classes/Class1.vb @@ -7,12 +7,13 @@ Public Class Class1 Public sAppPath As String = Application.StartupPath 'Public Shared DBConString As String = "Server=NBMIESENBECK\SPIELWIESE;Initial Catalog=Doku;User ID=sa;Password=verag#3;Connection Timeout=5;" Public Shared DBConString As String - Public Shared DBConstringDev As String = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;" - Public Shared DBADMINBuchhaltung As String = "Data Source=SQLGuide01.verag.ost.dmn;Initial Catalog=ADMIN;Integrated Security=false;User ID=sa;Password=BmWr501956;" + Public Shared DBConstringDev As String = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=AppUser;Password=yp/THDd?xM+pZ$;Connection Timeout=5;" + Public Shared DBADMINBuchhaltung As String = "Data Source=SQLGuide01.verag.ost.dmn;Initial Catalog=ADMIN;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;" Public Shared DBAdmin As String = "[SQLGuide01.verag.ost.dmn].ADMIN" - Public Shared DBDoku As String = "Server=SQLGuide01.verag.ost.dmn\Verag;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;" + 'Public Shared DBDoku As String = "Server=SQLGuide01.verag.ost.dmn\Verag;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;" + Public Shared DBDoku As String = "Server=SQLGuide01.verag.ost.dmn\Verag;Initial Catalog=Doku;User ID=AppUser;Password=yp/THDd?xM+pZ$;Connection Timeout=5;" 'Public Shared DBDoku As String = "Server=dokusql.verag.ost.dmn\sqlexpress;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;" - Public Shared DBDokuTest As String = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;" + Public Shared DBDokuTest As String = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=AppUser;Password=yp/THDd?xM+pZ$;Connection Timeout=5;" 'Public Shared FilePath As String = "\\192.168.0.253\backup\temp_Sebastian\Spielwiese\Doku" Public Shared FilePath As String ' = "\\192.168.0.90\f\EDV-Wartung\Dokumentation" Public Shared Absender As String = "Absender Standard" diff --git a/Dokumentation/Classes/DHCP.vb b/Dokumentation/Classes/DHCP.vb index 3d2f914..909d3cd 100644 --- a/Dokumentation/Classes/DHCP.vb +++ b/Dokumentation/Classes/DHCP.vb @@ -1,5 +1,6 @@ Imports System.Net Imports System.Runtime.InteropServices +Imports Dhcp Public Class DHCP @@ -110,15 +111,29 @@ Public Class DHCP ReDim DHCP_Clients(Client_Array.NumElements - 1) For i = 0 To Client_Array.NumElements - 1 + ' pt = IntPtr.Zero '''keine Ahnung, nur ein Test, kann wieder weg pt = Marshal.ReadIntPtr(Client_Array.Clients, j) - DHCP_Clients(i) = Marshal.PtrToStructure(pt, GetType(DHCP_CLIENT_INFO)) + 'DHCP_Clients(i) = Marshal.PtrToStructure(pt, GetType(DHCP_CLIENT_INFO)) pt = IntPtr.Zero j = j + 4 'Form1.Label1.Text &= DHCP_Clients(i).ClientName & " - " & DHCP_Clients(i).ClientIpAddress & " - " & Scobe_C - ((DHCP_Clients(i).ClientIpAddress * -1) + d) & vbCrLf + Next i + ' MsgBox("") + End Sub + Public Shared Function DHCP1(dhcps As String) + + Dim dhcpsrv As DhcpServer = DhcpServer.Connect(dhcps) + Dim scope = dhcpsrv.Scopes.First() + Dim activeClients = scope.Clients '.Where(Function(c) c.AddressState = DhcpServerClientAddressStates.Active) + + Return activeClients + + End Function + Friend Shared Function StringIPAddressToUInt32(Address As String) As UInteger diff --git a/Dokumentation/Dokumentation.vbproj b/Dokumentation/Dokumentation.vbproj index 2e33516..1af37c1 100644 --- a/Dokumentation/Dokumentation.vbproj +++ b/Dokumentation/Dokumentation.vbproj @@ -15,6 +15,7 @@ true true false + \\192.168.0.91\f\Programme\Doku\ false Unc @@ -32,10 +33,9 @@ false true true - - AnyCPU + x64 true full true @@ -93,6 +93,9 @@ ..\packages\ClosedXML.0.94.2\lib\net46\ClosedXML.dll + + ..\packages\DhcpServerApi.0.3.0.0\lib\net40\DhcpServerApi.dll + ..\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.dll diff --git a/Dokumentation/Main.vb b/Dokumentation/Main.vb index 060664d..1f8332d 100644 --- a/Dokumentation/Main.vb +++ b/Dokumentation/Main.vb @@ -645,30 +645,114 @@ Public Class Main End Function Private Sub CmdTest_Click(sender As Object, e As EventArgs) Handles CmdTest.Click - + DHCP.DHCP1("192.168.0.98") End Sub Private Sub CMdTest2_Click(sender As Object, e As EventArgs) Handles CMdTest2.Click - Dim testuser As New cDomUser - testuser.getDomUser("mit_email", "ms@verag.ag") - - Dim frm As New frmLeer - frm.Text = "Benutzerverwaltung" - Dim usrcntrl As New uscntr_DomUser - usrcntrl.DomUser = testuser - usrcntrl.Dock = DockStyle.Fill : frm.PanMain.Controls.Add(usrcntrl) - frm.Size = usrcntrl.Size - frm.Show() - - AddHandler frm.FormClosing, Function() - - End Function - - + DeleteGastWLANUser("ABABAB") End Sub Private Sub btnTest3_Click(sender As Object, e As EventArgs) Handles btnTest3.Click - RestartServices("TS12.verag.ost.dmn", "Druckerwarteschlange") + Dim i As Integer = 0 + Dim c As String + ' For meh As Integer = 0 To 1 + Dim a, b As String + a = UsernamePasswordGenerator("u") + b = UsernamePasswordGenerator("p") + c &= a & " - " & b & vbCrLf + AddGastWLANUser(a, b) + 'Next + + WriteToFile(Application.StartupPath & "\WLAN.txt", c) + 'MsgBox(a & vbCrLf & b) End Sub + Public Function UsernamePasswordGenerator(x As String, Optional ByVal Zeichenanzahl As Integer = 6) As String ' wenn u dann Username, sonst Password + Dim str As String + Dim up As String + If x = "u" Then + str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + Else + str = "0123456789" + End If + + Dim r As New Random + For i As Integer = 0 To Zeichenanzahl - 1 + up &= str(r.Next(0, str.Length)).ToString + Next + + Return up + 'MsgBox(up) + + End Function + + Private Function AddGastWLANUser(Username As String, Optional ByVal Password As String = "verag1", Optional ByVal Zugangsdaten As String = "WLANAdmin@192.168.0.97 -pw 6a0D5Ys93uugLi3uVciV", Optional ByVal AblaufZeit As Integer = 2) + If Not File.Exists(Application.StartupPath & "\AddWLANUser.bat") Then File.Create(Application.StartupPath & "\AddWLANUser.bat") + Dim AddWLANUser As String = Application.StartupPath & "\AddWLANUser.bat" + Dim exptime As String = Date.Now.AddHours(AblaufZeit).ToString("yyyy-MM-dd HH:mm") + Dim battext As String = "" + battext = "( +echo configure terminal +echo dynamic-guest username " & Username & " +echo password " & Password & " +echo expire-time " & exptime & " +echo group Fahrer_Gruppe + +echo exit +echo exit +echo exit +) | plink -ssh " & Zugangsdaten & " +exit" + + WriteToFile(AddWLANUser, battext) + Threading.Thread.Sleep(1500) + + Dim Add As New Process + Add.StartInfo.FileName = Application.StartupPath & "\RunNHide.exe" + Add.StartInfo.Arguments = AddWLANUser + Add.Start() + + End Function + + + Private Function DeleteGastWLANUser(Username As String, Optional ByVal Zugangsdaten As String = "WLANAdmin@192.168.0.97 -pw 6a0D5Ys93uugLi3uVciV") + If Not File.Exists(Application.StartupPath & "\DELWLANUser.bat") Then File.Create(Application.StartupPath & "\DELWLANUser.bat") + Dim DELWLANUser As String = Application.StartupPath & "\DELWLANUser.bat" + Dim battext As String = "" + battext = "( +echo configure terminal + +echo no dynamic-guest " & Username & " + + +echo exit +echo exit +echo exit +) | plink -ssh " & Zugangsdaten & " +exit" + + WriteToFile(DELWLANUser, battext) + Threading.Thread.Sleep(1500) + + Dim del As New Process + del.StartInfo.FileName = Application.StartupPath & "\RunNHide.exe" + del.StartInfo.Arguments = DELWLANUser + del.Start() + + 'Process.Start(Application.StartupPath & "\RunNHide.exe " & DELWLANUser) + End Function + + Public Shared Function WriteToFile(filepath As String, texttowrite As String) + Try + Dim objWriter As New System.IO.StreamWriter(filepath) + objWriter.Write(texttowrite) + objWriter.Close() + Catch ex As Exception + MsgBox(filepath & vbCrLf & " konnte nicht geschrieben werden." & vbCrLf & ex.Message) + End Try + End Function + + + + Public Sub RestartServices(Servername As String, Dienst As String) 'Dim Servername As String = "TS12.verag.ost.dmn" @@ -715,21 +799,30 @@ Public Class Main Public Function GetDHCPClients(Netzwerk As String, DHCPServer As String, Fill As Boolean, ByRef ds As DataSet) - Dim NWShort As String + Dim DHCPClientList = DHCP.DHCP1(DHCPServer) + + 'Dim NWShort As String Dim DHCPClientIP As String - Dim dhcpclients() As DHCP.DHCP_CLIENT_INFO + 'Dim dhcpclients() As DHCP.DHCP_CLIENT_INFO LblDebugInfo.Text &= "" - Dim a As UInteger = DHCP.StringIPAddressToUInt32(Netzwerk) - Dim b As UInteger = DHCP.StringIPAddressToUInt32("255.255.255.255") - DHCP.ListSubnetClients(DHCPServer, Netzwerk, dhcpclients) - DHCP.StringNWAdressToNWAdressSHORT(Netzwerk, NWShort) + 'Dim a As UInteger = DHCP.StringIPAddressToUInt32(Netzwerk) + 'Dim b As UInteger = DHCP.StringIPAddressToUInt32("255.255.255.255") + 'DHCP.ListSubnetClients(DHCPServer, Netzwerk, dhcpclients) + 'DHCP.StringNWAdressToNWAdressSHORT(Netzwerk, NWShort) + + 'Dim test As String + 'For Each client In DHCPClientList + ' test &= client.name & vbCrLf + + 'Next + Try - For i = 0 To DHCP.Client_Array.NumElements - 1 + For Each dhcpclient In DHCPClientList 'DHCP.Client_Array.NumElements - 1 - DHCPClientIP = NWShort & (b - ((dhcpclients(i).ClientIpAddress * -1) + a - 1)).ToString + DHCPClientIP = dhcpclient.IpAddress.ToString 'NWShort & (b - ((dhcpclient.IpAddress * -1) + a - 1)).ToString ''----------------------------------------Fill True: Wenn DHCP Clients bereits im DS enthalten sind werden diese Hosts geändert. ' If Fill = True Then @@ -737,7 +830,7 @@ Public Class Main HostRow = ds.Tables(0).Select("IPAdresse = '" & DHCPClientIP & "'") ' MsgBox(DHCPClientIP & HostRow.Length) If HostRow.Length > 0 Then - HostRow(0)("FQDN") = "*" & dhcpclients(i).ClientName + HostRow(0)("FQDN") = "*" & dhcpclient.Name HostRow(0)("QINFO") = "DHCP Client" @@ -752,10 +845,10 @@ Public Class Main Dim newrow As DataRow = ds.Tables(0).NewRow() newrow("IPAdresse") = DHCPClientIP - newrow("FQDN") = "*" & dhcpclients(i).ClientName + newrow("FQDN") = "*" & dhcpclient.Name newrow("QINFO") = "DHCP Client" newrow("DHCP") = "1" - newrow("Host") = (b - ((dhcpclients(i).ClientIpAddress * -1) + a - 1)).ToString + newrow("Host") = Class1.IP2Host(dhcpclient.ipaddress.ToString) '(b - ((dhcpclient.IPAddress * -1) + a - 1)).ToString ds.Tables(0).Rows.Add(newrow) 'End If diff --git a/Dokumentation/My Project/AssemblyInfo.vb b/Dokumentation/My Project/AssemblyInfo.vb index 4dfe3f5..05d0dc5 100644 --- a/Dokumentation/My Project/AssemblyInfo.vb +++ b/Dokumentation/My Project/AssemblyInfo.vb @@ -10,9 +10,9 @@ Imports System.Runtime.InteropServices - + - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Dokumentation/My Project/Resources.Designer.vb b/Dokumentation/My Project/Resources.Designer.vb index 9c85999..bf60a07 100644 --- a/Dokumentation/My Project/Resources.Designer.vb +++ b/Dokumentation/My Project/Resources.Designer.vb @@ -289,7 +289,7 @@ Namespace My.Resources End Property ''' - ''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.69 ähnelt. + ''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.72 ähnelt. ''' Friend ReadOnly Property Version() As String Get diff --git a/Dokumentation/My Project/Resources.resx b/Dokumentation/My Project/Resources.resx index d2a75d3..5cd95ff 100644 --- a/Dokumentation/My Project/Resources.resx +++ b/Dokumentation/My Project/Resources.resx @@ -155,7 +155,7 @@ ..\Resources\Admin.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - 0.0.1.69 + 0.0.1.72 ..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Dokumentation/frmLeer.Designer.vb b/Dokumentation/frmLeer.Designer.vb index bf743d9..c9747e9 100644 --- a/Dokumentation/frmLeer.Designer.vb +++ b/Dokumentation/frmLeer.Designer.vb @@ -46,6 +46,7 @@ Partial Class frmLeer Me.ClientSize = New System.Drawing.Size(246, 450) Me.Controls.Add(Me.PanMain) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) + Me.KeyPreview = True Me.Name = "frmLeer" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "frmLeer" diff --git a/Dokumentation/frmLeer.vb b/Dokumentation/frmLeer.vb index 64cd1c4..105f08b 100644 --- a/Dokumentation/frmLeer.vb +++ b/Dokumentation/frmLeer.vb @@ -2,4 +2,9 @@ Private Sub frmLeer_Load(sender As Object, e As EventArgs) Handles Me.Load ' Me.Location = New Point(MousePosition.X - Me.Size.Width / 2, MousePosition.Y - Me.Size.Height / 2) End Sub + + Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown + If e.KeyCode = Keys.Escape Then Me.Close() + End Sub + End Class \ No newline at end of file diff --git a/Dokumentation/packages.config b/Dokumentation/packages.config index a2e7297..25a1570 100644 --- a/Dokumentation/packages.config +++ b/Dokumentation/packages.config @@ -1,6 +1,7 @@  + diff --git a/Dokumentation/uscntr_DomUser.Designer.vb b/Dokumentation/uscntr_DomUser.Designer.vb index 0ba335a..74dcce0 100644 --- a/Dokumentation/uscntr_DomUser.Designer.vb +++ b/Dokumentation/uscntr_DomUser.Designer.vb @@ -149,7 +149,7 @@ Partial Class uscntr_DomUser Me.txtEMailAdresse.Margin = New System.Windows.Forms.Padding(8, 3, 8, 3) Me.txtEMailAdresse.Name = "txtEMailAdresse" Me.txtEMailAdresse.Size = New System.Drawing.Size(244, 20) - Me.txtEMailAdresse.TabIndex = 5 + Me.txtEMailAdresse.TabIndex = 1 ' 'Label2 ' diff --git a/Dokumentation/uscntr_DomUserList.Designer.vb b/Dokumentation/uscntr_DomUserList.Designer.vb index c2d8f50..a090182 100644 --- a/Dokumentation/uscntr_DomUserList.Designer.vb +++ b/Dokumentation/uscntr_DomUserList.Designer.vb @@ -133,7 +133,7 @@ Partial Class uscntr_DomUserList Me.TextBox1.Margin = New System.Windows.Forms.Padding(8) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(158, 20) - Me.TextBox1.TabIndex = 2 + Me.TextBox1.TabIndex = 1 ' 'Label1 ' @@ -150,7 +150,7 @@ Partial Class uscntr_DomUserList Me.cbDomain.Location = New System.Drawing.Point(231, 26) Me.cbDomain.Name = "cbDomain" Me.cbDomain.Size = New System.Drawing.Size(211, 21) - Me.cbDomain.TabIndex = 0 + Me.cbDomain.TabIndex = 2 ' 'Panel2 ' diff --git a/Dokumentation/uscntr_DomUserList.vb b/Dokumentation/uscntr_DomUserList.vb index 0c054f1..23d7758 100644 --- a/Dokumentation/uscntr_DomUserList.vb +++ b/Dokumentation/uscntr_DomUserList.vb @@ -1,12 +1,16 @@ Imports System.Windows.Forms Public Class uscntr_DomUserList + + Dim DGVi As Integer = 0 + Private Sub uscntr_DomUserList_Load(sender As Object, e As EventArgs) Handles Me.Load Class1.EnableDoubleBuffered(dgvListUser) LoadDomains() LoadDGV() End Sub + Function LoadDomains() Dim ds As New DataSet cSQL.SQL2DS("select distinct du_dom from Doku.dbo.TbL_DomUser order by du_dom", ds, Class1.DBDoku) @@ -19,6 +23,7 @@ Public Class uscntr_DomUserList Function LoadDGV(Optional ByVal ReturnDataTable As Boolean = False) + DGVi = 0 Dim ds As New DataSet cSQL.SQL2DS("select * from Doku.dbo.TbL_DomUser " & ReturnOfTheWhere() & " ORDER BY du_nachname", ds, Class1.DBDoku) @@ -61,10 +66,44 @@ Public Class uscntr_DomUserList End Function Private Sub dgvListUser_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvListUser.CellDoubleClick 'dgvListUser.CellContentDoubleClick ', dgvListUser.CellDoubleClick - Dim testuser As New cDomUser - testuser.getDomUser("du_ID", dgvListUser.CurrentRow.Cells("du_ID").Value) + 'Dim testuser As New cDomUser + 'testuser.getDomUser("du_ID", dgvListUser.CurrentRow.Cells("du_ID").Value) - If Application.OpenForms().OfType(Of uscntr_DomUser).Any Then Exit Sub + 'If Application.OpenForms().OfType(Of uscntr_DomUser).Any Then Exit Sub + + 'Dim frm As New frmLeer + 'frm.Text = testuser.du_sAMAc + 'Dim usrcntrl As New uscntr_DomUser + 'usrcntrl.DomUser = testuser + 'usrcntrl.Dock = DockStyle.Fill : frm.PanMain.Controls.Add(usrcntrl) + 'frm.Size = usrcntrl.Size + 'Me.Parent.Enabled = False + + 'AddHandler frm.FormClosing, Function() + ' Try + ' Me.Parent.Enabled = True + ' BringToFront() + ' LoadDGV() + ' Catch + ' End Try + ' End Function + + 'frm.Show() + BeamMeUp() + + + End Sub + + Private Function BeamMeUp(Optional Enter As Boolean = False, Optional RI As Integer = 0) + Dim testuser As New cDomUser + If Enter Then + testuser.getDomUser("du_ID", dgvListUser.Rows(RI).Cells("du_ID").Value) + Else + testuser.getDomUser("du_ID", dgvListUser.CurrentRow.Cells("du_ID").Value) + End If + + + If Application.OpenForms().OfType(Of uscntr_DomUser).Any Then Exit Function Dim frm As New frmLeer frm.Text = testuser.du_sAMAc @@ -84,8 +123,7 @@ Public Class uscntr_DomUserList End Function frm.Show() - - End Sub + End Function Function ReturnOfTheWhere() Dim Dom As String = cbDomain.SelectedItem @@ -122,6 +160,24 @@ Public Class uscntr_DomUserList LoadDGV() End Sub + Private Sub EnterPress(ByVal sender As Object, ByVal e As KeyEventArgs) Handles TextBox1.KeyDown, dgvListUser.KeyDown + If e.KeyCode = Keys.Enter Then + ' dgvListUser.Rows(0).Selected = True + BeamMeUp(True, DGVi) + ElseIf e.KeyCode = Keys.Down Then + If dgvListUser.Rows.Count - 1 > DGVi Then + DGVi = DGVi + 1 + dgvListUser.Rows(DGVi).Selected = True + End If + ElseIf e.KeyCode = Keys.Up Then + If DGVi > 0 Then + DGVi = DGVi - 1 + dgvListUser.Rows(DGVi).Selected = True + End If + End If + + End Sub + Private Sub cmdReset_Click(sender As Object, e As EventArgs) Handles cmdReset.Click TextBox1.Text = "" cbDomain.SelectedItem = "*" @@ -140,4 +196,7 @@ Public Class uscntr_DomUserList Class1.datatable_2_csv_export(LoadDGV(True)) End Sub + Private Sub dgvListUser_CellContentClick_1(sender As Object, e As DataGridViewCellEventArgs) Handles dgvListUser.CellClick + DGVi = dgvListUser.CurrentRow.Index + End Sub End Class diff --git a/Dokumentation/uscntr_SendMSG.vb b/Dokumentation/uscntr_SendMSG.vb index 35a1765..7759795 100644 --- a/Dokumentation/uscntr_SendMSG.vb +++ b/Dokumentation/uscntr_SendMSG.vb @@ -169,6 +169,7 @@ Public Class uscntr_SendMSG 'MsgBox(battext) End Function + Function ErsterEintragVonListOfString(liste As List(Of String)) If liste.Count > 0 Then Return liste(0)