Permalink
Browse files

Add 'Connect without credentials'

I have my username/password stored in mRemote, but sometimes i want to
log in as the service account or administrator account for various
reasons. This "new feature" allows you to quickly enter credentials
without changing other settings.
  • Loading branch information...
1 parent 3eb5d4a commit 2ec0cdbc306b99ebf10614c7304a3b3960d6dbfe Ruben committed Aug 19, 2013
@@ -1769,7 +1769,6 @@ Namespace App
AddHandler newProtocol.Connected, AddressOf Prot_Event_Connected
AddHandler newProtocol.Closed, AddressOf Prot_Event_Closed
AddHandler newProtocol.ErrorOccured, AddressOf Prot_Event_ErrorOccured
-
newProtocol.InterfaceControl = New Connection.InterfaceControl(cContainer, newProtocol, newConnectionInfo)
newProtocol.Force = Force
@@ -2504,6 +2504,7 @@ Namespace Connection
DoNotJump = 4
OverridePanel = 8
DontUseConsoleSession = 16
+ NoCredentials = 32
End Enum
End Class
End Namespace
@@ -244,6 +244,9 @@ Namespace Connection
_rdpClient.TransportSettings.GatewayCredsSource = 1 ' TSC_PROXY_CREDS_MODE_SMARTCARD
End If
If _rdpVersion >= Versions.RDC61 Then
+ If Me.Force And Info.Force.NoCredentials = Info.Force.NoCredentials Then
+ Return
+ End If
If _connectionInfo.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.Yes Then
_rdpClient.TransportSettings2.GatewayUsername = _connectionInfo.Username
_rdpClient.TransportSettings2.GatewayPassword = _connectionInfo.Password
@@ -291,6 +294,10 @@ Namespace Connection
Private Sub SetCredentials()
Try
+ If Me.Force And Info.Force.NoCredentials = Info.Force.NoCredentials Then
+ Return
+ End If
+
Dim userName As String = _connectionInfo.Username
Dim password As String = _connectionInfo.Password
Dim domain As String = _connectionInfo.Domain
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
-' Runtime Version:4.0.30319.296
+' Runtime Version:4.0.30319.18052
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
@@ -1290,6 +1290,15 @@ Namespace My
End Property
'''<summary>
+ ''' Looks up a localized string similar to Connect without credentials (enter it yourself).
+ '''</summary>
+ Friend Shared ReadOnly Property strConnectNoCredentials() As String
+ Get
+ Return ResourceManager.GetString("strConnectNoCredentials", resourceCulture)
+ End Get
+ End Property
+
+ '''<summary>
''' Looks up a localized string similar to Connect to console session.
'''</summary>
Friend Shared ReadOnly Property strConnectToConsoleSession() As String
@@ -105,15 +105,15 @@
</xsd:complexType>
</xsd:element>
</xsd:schema>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
@@ -2261,4 +2261,7 @@ mRemoteNG will now quit and begin with the installation.</value>
<data name="strYes" xml:space="preserve">
<value>Yes</value>
</data>
+ <data name="strConnectNoCredentials" xml:space="preserve">
+ <value>Connect without credentials (enter it yourself)</value>
+ </data>
</root>
@@ -24,6 +24,7 @@ Namespace UI
Friend WithEvents cMenTreeConnect As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeConnectWithOptions As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeConnectWithOptionsConnectToConsoleSession As System.Windows.Forms.ToolStripMenuItem
+ Friend WithEvents cMenTreeConnectWithOptionsNoCredentials As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeConnectWithOptionsConnectInFullscreen As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeDisconnect As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeSep2 As System.Windows.Forms.ToolStripSeparator
@@ -63,6 +64,7 @@ Namespace UI
Me.cMenTreeSep1 = New System.Windows.Forms.ToolStripSeparator()
Me.cMenTreeConnect = New System.Windows.Forms.ToolStripMenuItem()
Me.cMenTreeConnectWithOptions = New System.Windows.Forms.ToolStripMenuItem()
+ Me.cMenTreeConnectWithOptionsNoCredentials = New System.Windows.Forms.ToolStripMenuItem()
Me.cMenTreeConnectWithOptionsConnectToConsoleSession = New System.Windows.Forms.ToolStripMenuItem()
Me.cMenTreeConnectWithOptionsDontConnectToConsoleSession = New System.Windows.Forms.ToolStripMenuItem()
Me.cMenTreeConnectWithOptionsConnectInFullscreen = New System.Windows.Forms.ToolStripMenuItem()
@@ -164,7 +166,8 @@ Namespace UI
'
'cMenTreeConnectWithOptions
'
- Me.cMenTreeConnectWithOptions.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cMenTreeConnectWithOptionsConnectToConsoleSession, Me.cMenTreeConnectWithOptionsDontConnectToConsoleSession, Me.cMenTreeConnectWithOptionsConnectInFullscreen, Me.cMenTreeConnectWithOptionsChoosePanelBeforeConnecting})
+ Me.cMenTreeConnectWithOptions.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cMenTreeConnectWithOptionsConnectToConsoleSession, Me.cMenTreeConnectWithOptionsDontConnectToConsoleSession, Me.cMenTreeConnectWithOptionsConnectInFullscreen, Me.cMenTreeConnectWithOptionsChoosePanelBeforeConnecting, Me.cMenTreeConnectWithOptionsNoCredentials
+ })
Me.cMenTreeConnectWithOptions.Name = "cMenTreeConnectWithOptions"
Me.cMenTreeConnectWithOptions.Size = New System.Drawing.Size(186, 22)
Me.cMenTreeConnectWithOptions.Text = "Connect (with options)"
@@ -189,6 +192,13 @@ Namespace UI
Me.cMenTreeConnectWithOptionsConnectInFullscreen.Size = New System.Drawing.Size(231, 22)
Me.cMenTreeConnectWithOptionsConnectInFullscreen.Text = "Connect in fullscreen"
'
+ 'cMenTreeConnectWithOptionsNoCredentials
+ '
+ Me.cMenTreeConnectWithOptionsConnectInFullscreen.Image = Global.mRemoteNG.My.Resources.Resources.Fullscreen
+ Me.cMenTreeConnectWithOptionsConnectInFullscreen.Name = "cMenTreeConnectWithOptionsNoCredentials"
+ Me.cMenTreeConnectWithOptionsConnectInFullscreen.Size = New System.Drawing.Size(231, 22)
+ Me.cMenTreeConnectWithOptionsConnectInFullscreen.Text = "Connect without credentials"
+ '
'cMenTreeConnectWithOptionsChoosePanelBeforeConnecting
'
Me.cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Image = Global.mRemoteNG.My.Resources.Resources.Panels
@@ -481,6 +491,7 @@ Namespace UI
cMenTreeConnect.Text = My.Language.strConnect
cMenTreeConnectWithOptions.Text = My.Language.strConnectWithOptions
cMenTreeConnectWithOptionsConnectToConsoleSession.Text = My.Language.strConnectToConsoleSession
+ cMenTreeConnectWithOptionsNoCredentials.Text = My.Language.strConnectNoCredentials
cMenTreeConnectWithOptionsConnectInFullscreen.Text = My.Language.strConnectInFullscreen
cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Text = My.Language.strChoosePanelBeforeConnecting
cMenTreeDisconnect.Text = My.Language.strMenuDisconnect
@@ -937,6 +948,10 @@ Namespace UI
App.Runtime.OpenConnection(mRemoteNG.Connection.Info.Force.UseConsoleSession Or mRemoteNG.Connection.Info.Force.DoNotJump)
End Sub
+ Private Sub cMenTreeConnectWithOptionsNoCredentials_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cMenTreeConnectWithOptionsNoCredentials.Click
+ App.Runtime.OpenConnection(mRemoteNG.Connection.Info.Force.NoCredentials)
+ End Sub
+
Private Sub cMenTreeConnectWithOptionsDontConnectToConsoleSession_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cMenTreeConnectWithOptionsDontConnectToConsoleSession.Click
App.Runtime.OpenConnection(mRemoteNG.Connection.Info.Force.DontUseConsoleSession Or mRemoteNG.Connection.Info.Force.DoNotJump)
End Sub

0 comments on commit 2ec0cdb

Please sign in to comment.