This commit is contained in:
ms
2022-12-15 12:20:05 +01:00
parent f717deac50
commit e5536265a6
5 changed files with 49 additions and 22 deletions

View File

@@ -2,11 +2,19 @@
Public Class cExtProgramme Public Class cExtProgramme
Public Shared Function startlink(URL As String) Public Shared Function startlink(URL As String, Optional ByVal p As String = "")
Try Try
If URL.Contains("http") Or URL.Contains("https") Then If URL.Contains("http") Or URL.Contains("https") Then
If p = "" Then
Process.Start(URL) Process.Start(URL)
ElseIf p = "edge" Then
Dim edge As New Process
edge.StartInfo.FileName = "msedge.exe"
edge.StartInfo.Arguments = " " & URL
edge.Start()
End If
ElseIf URL = "" Then ElseIf URL = "" Then
Exit Function Exit Function
Else Else
@@ -124,7 +132,7 @@ Public Class cExtProgramme
commandcmd("cmdkey /generic:" & host & " /user:" & Username & " /pass:" & Password) commandcmd("cmdkey /generic:" & host & " /user:" & Username & " /pass:" & Password)
End If End If
Threading.Thread.Sleep(1000) Threading.Thread.Sleep(3000)
mstsc.StartInfo.FileName = "mstsc.exe" mstsc.StartInfo.FileName = "mstsc.exe"

View File

@@ -289,7 +289,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.79 ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.81 ä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.79</value> <value>0.0.1.81</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

@@ -72,6 +72,7 @@ Partial Class frmHostBearbeiten
Me.CmdDelete = New System.Windows.Forms.Button() Me.CmdDelete = New System.Windows.Forms.Button()
Me.TxtBenutzername = New System.Windows.Forms.TextBox() Me.TxtBenutzername = New System.Windows.Forms.TextBox()
Me.Panel1 = New System.Windows.Forms.Panel() Me.Panel1 = New System.Windows.Forms.Panel()
Me.Button1 = New System.Windows.Forms.Button()
Me.txtSSHPort = New System.Windows.Forms.TextBox() Me.txtSSHPort = New System.Windows.Forms.TextBox()
Me.Label14 = New System.Windows.Forms.Label() Me.Label14 = New System.Windows.Forms.Label()
Me.cmdRDP = New System.Windows.Forms.Button() Me.cmdRDP = New System.Windows.Forms.Button()
@@ -89,7 +90,7 @@ Partial Class frmHostBearbeiten
Me.PanFirewall = New System.Windows.Forms.Panel() Me.PanFirewall = New System.Windows.Forms.Panel()
Me.PanSlaves = New System.Windows.Forms.Panel() Me.PanSlaves = New System.Windows.Forms.Panel()
Me.PanNavTop = New System.Windows.Forms.Panel() Me.PanNavTop = New System.Windows.Forms.Panel()
Me.Button1 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.ContextMenuStrip2.SuspendLayout() Me.ContextMenuStrip2.SuspendLayout()
Me.ContextMenuStrip1.SuspendLayout() Me.ContextMenuStrip1.SuspendLayout()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
@@ -531,6 +532,7 @@ Partial Class frmHostBearbeiten
' '
'Panel1 'Panel1
' '
Me.Panel1.Controls.Add(Me.Button2)
Me.Panel1.Controls.Add(Me.Button1) Me.Panel1.Controls.Add(Me.Button1)
Me.Panel1.Controls.Add(Me.txtSSHPort) Me.Panel1.Controls.Add(Me.txtSSHPort)
Me.Panel1.Controls.Add(Me.Label14) Me.Panel1.Controls.Add(Me.Label14)
@@ -588,6 +590,21 @@ Partial Class frmHostBearbeiten
Me.Panel1.Size = New System.Drawing.Size(643, 460) Me.Panel1.Size = New System.Drawing.Size(643, 460)
Me.Panel1.TabIndex = 137 Me.Panel1.TabIndex = 137
' '
'Button1
'
Me.Button1.BackColor = System.Drawing.SystemColors.ControlLightLight
Me.Button1.FlatAppearance.BorderColor = System.Drawing.Color.DimGray
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Underline), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button1.ForeColor = System.Drawing.Color.Red
Me.Button1.Image = Global.Dokumentation.My.Resources.Resources.mstsc1
Me.Button1.Location = New System.Drawing.Point(271, 340)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(32, 32)
Me.Button1.TabIndex = 150
Me.Button1.Text = "[ ]"
Me.Button1.UseVisualStyleBackColor = False
'
'txtSSHPort 'txtSSHPort
' '
Me.txtSSHPort.Location = New System.Drawing.Point(123, 352) Me.txtSSHPort.Location = New System.Drawing.Point(123, 352)
@@ -762,20 +779,17 @@ Partial Class frmHostBearbeiten
Me.PanNavTop.Size = New System.Drawing.Size(309, 32) Me.PanNavTop.Size = New System.Drawing.Size(309, 32)
Me.PanNavTop.TabIndex = 141 Me.PanNavTop.TabIndex = 141
' '
'Button1 'Button2
' '
Me.Button1.BackColor = System.Drawing.SystemColors.ControlLightLight Me.Button2.BackColor = System.Drawing.SystemColors.ControlLightLight
Me.Button1.FlatAppearance.BorderColor = System.Drawing.Color.DimGray Me.Button2.FlatAppearance.BorderColor = System.Drawing.Color.DimGray
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Underline), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.Location = New System.Drawing.Point(332, 375)
Me.Button1.ForeColor = System.Drawing.Color.Red Me.Button2.Name = "Button2"
Me.Button1.Image = Global.Dokumentation.My.Resources.Resources.mstsc1 Me.Button2.Size = New System.Drawing.Size(96, 23)
Me.Button1.Location = New System.Drawing.Point(271, 340) Me.Button2.TabIndex = 151
Me.Button1.Name = "Button1" Me.Button2.Text = "Link mit Edge"
Me.Button1.Size = New System.Drawing.Size(32, 32) Me.Button2.UseVisualStyleBackColor = False
Me.Button1.TabIndex = 150
Me.Button1.Text = "[ ]"
Me.Button1.UseVisualStyleBackColor = False
' '
'frmHostBearbeiten 'frmHostBearbeiten
' '
@@ -872,4 +886,5 @@ Partial Class frmHostBearbeiten
Friend WithEvents Label14 As Label Friend WithEvents Label14 As Label
Friend WithEvents txtSSHPort As TextBox Friend WithEvents txtSSHPort As TextBox
Friend WithEvents Button1 As Button Friend WithEvents Button1 As Button
Friend WithEvents Button2 As Button
End Class End Class

View File

@@ -391,4 +391,8 @@
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
cExtProgramme.RDPConnect(host.FQDN, host.Benutzer, host.Passwort, True) cExtProgramme.RDPConnect(host.FQDN, host.Benutzer, host.Passwort, True)
End Sub End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
cExtProgramme.startlink(TxtLink.Text, "edge")
End Sub
End Class End Class