53 lines
1.3 KiB
VB.net
53 lines
1.3 KiB
VB.net
Imports System.DirectoryServices.ActiveDirectory
|
|
|
|
Public Class ThinClients
|
|
|
|
Dim ds As New DataSet
|
|
Private Sub SMB_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
Class1.EnableDoubleBuffered(dgv)
|
|
|
|
LoadSitzungen()
|
|
LoadDGV()
|
|
|
|
End Sub
|
|
|
|
Function LoadSitzungen()
|
|
|
|
cSQL.SQL2DS("select * from tbl_thinclienthosts", ds)
|
|
|
|
End Function
|
|
|
|
Function LoadDGV()
|
|
|
|
With dgv
|
|
.DataSource = ds.Tables(0)
|
|
.DefaultCellStyle.BackColor = Color.White
|
|
.AlternatingRowsDefaultCellStyle.BackColor = Color.AliceBlue
|
|
|
|
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
|
|
|
.AutoResizeColumn(1)
|
|
.AutoResizeColumn(2)
|
|
.AutoResizeColumn(3)
|
|
End With
|
|
counter.Text = dgv.Rows.Count
|
|
|
|
End Function
|
|
|
|
Private Sub Refresh_Click(sender As Object, e As EventArgs) Handles Refresh.Click
|
|
ds.Reset()
|
|
LoadSitzungen()
|
|
LoadDGV()
|
|
End Sub
|
|
|
|
Private Sub TeamviewerToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TeamviewerToolStripMenuItem.Click
|
|
Dim tv As String = dgv.CurrentRow.Cells("TeamviewerID").Value
|
|
|
|
If tv.Length > 0 Then
|
|
cExtProgramme.StartTeamviewer(tv)
|
|
End If
|
|
|
|
End Sub
|
|
|
|
|
|
End Class |