This commit is contained in:
ms
2020-01-08 14:32:30 +01:00
parent 5f24e2a9e1
commit 46a9991b2a
22 changed files with 1579 additions and 72 deletions

View File

@@ -1,6 +1,8 @@
Public Class uscntr_TSSitzungen
Dim Client As Boolean = False
Dim SelectedIndex As Integer = 0
Dim StartIndex As Integer = 0
Private Sub uscntr_TSSitzungen_Load(sender As Object, e As EventArgs) Handles Me.Load
Class1.EnableDoubleBuffered(dgvTSSitzungen)
@@ -13,6 +15,8 @@
cSQL.SQL2DS("SELECT * FROM TbL_TSSitzungen WHERE Name LIKE '" & ReturnOfTheWhere() & "' OR TSServer LIKE '" & ReturnOfTheWhere() & "' ORDER BY NAME", ds)
With dgvTSSitzungen
.DefaultCellStyle.BackColor = Color.White
.AlternatingRowsDefaultCellStyle.BackColor = Color.AliceBlue
.RowHeadersVisible = False
.DataSource = ds.Tables(0)
.Columns("Domain").Visible = False
@@ -50,6 +54,12 @@
End If
Try
dgvTSSitzungen.Rows(SelectedIndex).Selected = True
dgvTSSitzungen.FirstDisplayedScrollingRowIndex = StartIndex
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Function
@@ -142,4 +152,30 @@
cmdNachricht.Enabled = Not Client
Load2DGV()
End Sub
Private Sub ProfildatenÖffnenExplorerToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ProfildatenÖffnenExplorerToolStripMenuItem.Click
Dim Username As String = dgvTSSitzungen.CurrentRow.Cells("BenutzerAnmeldeName").Value
Dim Server As String = dgvTSSitzungen.CurrentRow.Cells("TSServer").Value & "." & dgvTSSitzungen.CurrentRow.Cells("Domain").Value
Dim temp As String = Username
Do Until temp.Substring(0, 1) = "\"
temp = temp.Substring(1, temp.Length - 1)
Loop
Username = temp.Substring(1, temp.Length - 1)
Dim Path As String = "\\" & Server & "\C$\Users\" & Username
IO.Directory.CreateDirectory(Path)
Process.Start(Path)
End Sub
Private Sub dgvTSSitzungen_CellContentClick_1(sender As Object, e As DataGridViewCellEventArgs) Handles dgvTSSitzungen.CellContentClick, dgvTSSitzungen.CellClick
SelectIndexes()
End Sub
Private Sub DGVScroll() Handles dgvTSSitzungen.Scroll
SelectIndexes()
End Sub
Function SelectIndexes()
SelectedIndex = dgvTSSitzungen.CurrentRow.Index
StartIndex = dgvTSSitzungen.FirstDisplayedScrollingRowIndex
End Function
End Class