RDP auch auf Computer

This commit is contained in:
ms
2022-12-28 12:03:37 +01:00
parent e5536265a6
commit 28fac86b58
5 changed files with 60 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ Public Class cDomUser
Property du_autologofftime As DateTime Property du_autologofftime As DateTime
Property mit_username As String = "" Property mit_username As String = ""
Property mit_pwd As String = "" Property mit_pwd As String = ""
Property du_computer As String = ""
'----------------------------------------- '-----------------------------------------
Dim SelectItems As String = "" Dim SelectItems As String = ""
Public Exist As Boolean = False Public Exist As Boolean = False
@@ -47,6 +48,7 @@ Public Class cDomUser
list.Add(New SQLVariable("du_autologofftime", du_autologofftime)) list.Add(New SQLVariable("du_autologofftime", du_autologofftime))
list.Add(New SQLVariable("mit_username", mit_username)) list.Add(New SQLVariable("mit_username", mit_username))
list.Add(New SQLVariable("mit_pwd", mit_pwd)) list.Add(New SQLVariable("mit_pwd", mit_pwd))
list.Add(New SQLVariable("du_computer", du_computer))
Return list Return list
End Function End Function

View File

@@ -289,7 +289,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.81 ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.82 ähnelt.
'''</summary> '''</summary>
Friend ReadOnly Property Version() As String Friend ReadOnly Property Version() As String
Get Get

View File

@@ -155,7 +155,7 @@
<value>..\Resources\Admin.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\Admin.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="Version" xml:space="preserve"> <data name="Version" xml:space="preserve">
<value>0.0.1.81</value> <value>0.0.1.82</value>
</data> </data>
<data name="Link" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Link" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

View File

@@ -53,6 +53,9 @@ Partial Class uscntr_DomUser
Me.cmd3Uhr = New System.Windows.Forms.Button() Me.cmd3Uhr = New System.Windows.Forms.Button()
Me.btnRDP = New System.Windows.Forms.Button() Me.btnRDP = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button()
Me.txtComputer = New System.Windows.Forms.TextBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.chkRDP2TS = New System.Windows.Forms.CheckBox()
Me.SuspendLayout() Me.SuspendLayout()
' '
'cmdSave 'cmdSave
@@ -353,7 +356,7 @@ Partial Class uscntr_DomUser
Me.btnRDP.BackColor = System.Drawing.SystemColors.ControlLightLight Me.btnRDP.BackColor = System.Drawing.SystemColors.ControlLightLight
Me.btnRDP.FlatAppearance.BorderColor = System.Drawing.Color.DimGray Me.btnRDP.FlatAppearance.BorderColor = System.Drawing.Color.DimGray
Me.btnRDP.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnRDP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnRDP.Location = New System.Drawing.Point(8, 219) Me.btnRDP.Location = New System.Drawing.Point(8, 258)
Me.btnRDP.Name = "btnRDP" Me.btnRDP.Name = "btnRDP"
Me.btnRDP.Size = New System.Drawing.Size(104, 23) Me.btnRDP.Size = New System.Drawing.Size(104, 23)
Me.btnRDP.TabIndex = 167 Me.btnRDP.TabIndex = 167
@@ -365,19 +368,51 @@ Partial Class uscntr_DomUser
Me.Button1.BackColor = System.Drawing.SystemColors.ControlLightLight Me.Button1.BackColor = System.Drawing.SystemColors.ControlLightLight
Me.Button1.FlatAppearance.BorderColor = System.Drawing.Color.DimGray Me.Button1.FlatAppearance.BorderColor = System.Drawing.Color.DimGray
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Location = New System.Drawing.Point(118, 219) Me.Button1.Location = New System.Drawing.Point(118, 258)
Me.Button1.Name = "Button1" Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(104, 23) Me.Button1.Size = New System.Drawing.Size(104, 23)
Me.Button1.TabIndex = 168 Me.Button1.TabIndex = 168
Me.Button1.Text = "RDP Fenster" Me.Button1.Text = "RDP Fenster"
Me.Button1.UseVisualStyleBackColor = False Me.Button1.UseVisualStyleBackColor = False
' '
'txtComputer
'
Me.txtComputer.Location = New System.Drawing.Point(8, 232)
Me.txtComputer.Margin = New System.Windows.Forms.Padding(8, 3, 8, 3)
Me.txtComputer.Name = "txtComputer"
Me.txtComputer.Size = New System.Drawing.Size(300, 20)
Me.txtComputer.TabIndex = 169
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(5, 216)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(52, 13)
Me.Label4.TabIndex = 170
Me.Label4.Text = "Computer"
'
'chkRDP2TS
'
Me.chkRDP2TS.AutoSize = True
Me.chkRDP2TS.CheckAlign = System.Drawing.ContentAlignment.MiddleRight
Me.chkRDP2TS.Location = New System.Drawing.Point(230, 262)
Me.chkRDP2TS.Name = "chkRDP2TS"
Me.chkRDP2TS.Size = New System.Drawing.Size(69, 17)
Me.chkRDP2TS.TabIndex = 171
Me.chkRDP2TS.Text = "RDP2TS"
Me.chkRDP2TS.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.chkRDP2TS.UseVisualStyleBackColor = True
'
'uscntr_DomUser 'uscntr_DomUser
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.AutoSize = True Me.AutoSize = True
Me.BackColor = System.Drawing.SystemColors.GradientInactiveCaption Me.BackColor = System.Drawing.SystemColors.GradientInactiveCaption
Me.Controls.Add(Me.chkRDP2TS)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.txtComputer)
Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.btnRDP) Me.Controls.Add(Me.btnRDP)
Me.Controls.Add(Me.cmd3Uhr) Me.Controls.Add(Me.cmd3Uhr)
@@ -447,4 +482,7 @@ Partial Class uscntr_DomUser
Friend WithEvents cmd3Uhr As Button Friend WithEvents cmd3Uhr As Button
Friend WithEvents btnRDP As Button Friend WithEvents btnRDP As Button
Friend WithEvents Button1 As Button Friend WithEvents Button1 As Button
Friend WithEvents txtComputer As TextBox
Friend WithEvents Label4 As Label
Friend WithEvents chkRDP2TS As CheckBox
End Class End Class

View File

@@ -18,6 +18,7 @@
txtDomaene.Text = DomUser.du_Dom txtDomaene.Text = DomUser.du_Dom
chkEMailAktiv.Checked = DomUser.du_Email_Activated chkEMailAktiv.Checked = DomUser.du_Email_Activated
txtInfo.Text = DomUser.du_Info txtInfo.Text = DomUser.du_Info
txtComputer.Text = DomUser.du_computer
txtDomKennwort.Text = DomUser.du_Kennwort txtDomKennwort.Text = DomUser.du_Kennwort
txtEMailAdresse.Enabled = DomUser.du_Email_Activated txtEMailAdresse.Enabled = DomUser.du_Email_Activated
@@ -40,6 +41,7 @@
DomUser.du_Email_Activated = chkEMailAktiv.Checked DomUser.du_Email_Activated = chkEMailAktiv.Checked
DomUser.du_EMail = txtEMailAdresse.Text DomUser.du_EMail = txtEMailAdresse.Text
DomUser.du_Info = txtInfo.Text DomUser.du_Info = txtInfo.Text
DomUser.du_computer = txtComputer.Text
DomUser.du_autologoff = chkAutoLogoff.Checked DomUser.du_autologoff = chkAutoLogoff.Checked
DomUser.du_autologofftime = DateTimePicker1.Value DomUser.du_autologofftime = DateTimePicker1.Value
End Function End Function
@@ -119,10 +121,22 @@
End Sub End Sub
Private Sub btnRDP_Click(sender As Object, e As EventArgs) Handles btnRDP.Click Private Sub btnRDP_Click(sender As Object, e As EventArgs) Handles btnRDP.Click
cExtProgramme.RDPConnect("rdpintern.verag.ag", txtDomaene.Text & "\" & txtBenutzer.Text, txtDomKennwort.Text, False) cExtProgramme.RDPConnect(SelectRDPTarget(), txtDomaene.Text & "\" & txtBenutzer.Text, txtDomKennwort.Text, False)
End Sub End Sub
Private Sub Button1_Click_2(sender As Object, e As EventArgs) Handles Button1.Click Private Sub Button1_Click_2(sender As Object, e As EventArgs) Handles Button1.Click
cExtProgramme.RDPConnect("rdpintern.verag.ag", txtDomaene.Text & "\" & txtBenutzer.Text, txtDomKennwort.Text, True) cExtProgramme.RDPConnect(SelectRDPTarget(), txtDomaene.Text & "\" & txtBenutzer.Text, txtDomKennwort.Text, True)
End Sub End Sub
Private Function SelectRDPTarget() As String
If DomUser.du_computer.Length > 0 Then
If chkRDP2TS.Checked Then
Return "rdpintern.verag.ag"
Else
Return DomUser.du_computer
End If
Else
Return "rdpintern.verag.ag"
End If
End Function
End Class End Class