forked from mRemoteNG/mRemoteNG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14d1f6c
commit d5d2d5b
Showing
10 changed files
with
451 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<root> | ||
<!-- | ||
Microsoft ResX Schema | ||
Version 2.0 | ||
The primary goals of this format is to allow a simple XML format | ||
that is mostly human readable. The generation and parsing of the | ||
various data types are done through the TypeConverter classes | ||
associated with the data types. | ||
Example: | ||
... ado.net/XML headers & schema ... | ||
<resheader name="resmimetype">text/microsoft-resx</resheader> | ||
<resheader name="version">2.0</resheader> | ||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||
<value>[base64 mime encoded serialized .NET Framework object]</value> | ||
</data> | ||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||
<comment>This is a comment</comment> | ||
</data> | ||
There are any number of "resheader" rows that contain simple | ||
name/value pairs. | ||
Each data row contains a name, and value. The row also contains a | ||
type or mimetype. Type corresponds to a .NET class that support | ||
text/value conversion through the TypeConverter architecture. | ||
Classes that don't support this are serialized and stored with the | ||
mimetype set. | ||
The mimetype is used for serialized objects, and tells the | ||
ResXResourceReader how to depersist the object. This is currently not | ||
extensible. For a given mimetype the value must be set accordingly: | ||
Note - application/x-microsoft.net.object.binary.base64 is the format | ||
that the ResXResourceWriter will generate, however the reader can | ||
read any of the formats listed below. | ||
mimetype: application/x-microsoft.net.object.binary.base64 | ||
value : The object must be serialized with | ||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | ||
: and then encoded with base64 encoding. | ||
mimetype: application/x-microsoft.net.object.soap.base64 | ||
value : The object must be serialized with | ||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||
: and then encoded with base64 encoding. | ||
mimetype: application/x-microsoft.net.object.bytearray.base64 | ||
value : The object must be serialized into a byte array | ||
: using a System.ComponentModel.TypeConverter | ||
: and then encoded with base64 encoding. | ||
--> | ||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||
<xsd:element name="root" msdata:IsDataSet="true"> | ||
<xsd:complexType> | ||
<xsd:choice maxOccurs="unbounded"> | ||
<xsd:element name="metadata"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||
</xsd:sequence> | ||
<xsd:attribute name="name" use="required" type="xsd:string" /> | ||
<xsd:attribute name="type" type="xsd:string" /> | ||
<xsd:attribute name="mimetype" type="xsd:string" /> | ||
<xsd:attribute ref="xml:space" /> | ||
</xsd:complexType> | ||
</xsd:element> | ||
<xsd:element name="assembly"> | ||
<xsd:complexType> | ||
<xsd:attribute name="alias" type="xsd:string" /> | ||
<xsd:attribute name="name" type="xsd:string" /> | ||
</xsd:complexType> | ||
</xsd:element> | ||
<xsd:element name="data"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||
</xsd:sequence> | ||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||
<xsd:attribute ref="xml:space" /> | ||
</xsd:complexType> | ||
</xsd:element> | ||
<xsd:element name="resheader"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
</xsd:sequence> | ||
<xsd:attribute name="name" type="xsd:string" use="required" /> | ||
</xsd:complexType> | ||
</xsd:element> | ||
</xsd:choice> | ||
</xsd:complexType> | ||
</xsd:element> | ||
</xsd:schema> | ||
<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> | ||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
<value>49</value> | ||
</metadata> | ||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | ||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||
<value> | ||
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
AABtqNwNW4y4K0lEPoJKSkrgVVVV709PT/dKSkr3U1NT9EBAQN1KSEhkXprRKm+n2g0AAAAAAAAAAAAA | ||
AAAAAAAAU5jbr0Z7sv9gWVL/eXl5/4eHh/95eXn/Xl5e/4qKiv9ubm7/SUhH/0aIyf9YmNenAAAAAAAA | ||
AAAAAAAAAAAAADGN6f9/qM3/fHdy/4yMjP9tbW3/TU1N/0hISP9nZ2f/dXV1/2dmZP9+t+v/K4He+gAA | ||
AAAAAAAAAAAAAAAAAABCX3uuf42a/4WDgv9ZWVn/Wlpa/5GRkf+KiYn/TExM/1FRUf93dnX/a36P/z9Z | ||
dqEAAAAAAAAAAAAAAAAAAAAAUk1HHG9tasFOTk//dXR0/2ZlZP+wsLD/lpaW/19eXf9wcG//VlZX/3JJ | ||
N/SkSynkrkYd1ppWPWtklMMYbKfcCQAAAABLSkkoRD88vnh7ff1udXv/Y4er/1t4lP9xdXj/bm1t/4lp | ||
Sf/knFT/7aZX/9+FQP+XTTvlR323y2Cg2XUAAAAAAAAAAFhAM0tFbJP0lsbz/7LZ/f+53v//jb3o/1Nn | ||
dv/nmlP//6RY//+nVv//qFz/z3pS/4Ocwf8zi+L8AAAAAAAAAAAsRWRmgKrU/7vc+P+q0vj/msXu/7jZ | ||
9/9fjr3/26Bl//6oWv/9nlP//5VG/++bZf+aobj/RnGn2gAAAAAAAAAABTVrezxcgf9zl7v/X4at/zZh | ||
iv9QdJn/I0Vm/8+2c///wFv//7JS///Bg//4tZD/rksk3pI/DzsAAAAAAAAAAC9Jc3wjTYD/FUZ9/x1L | ||
e/8OO2z/GkVx/wgoTP9vgob/go6L/5qclv/9xKD/vVUw3Zs4BUMAAAAAAAAAAAAAAABiZGk0PVZ32yNV | ||
jf8VTYr/IFSK/w47av9JY33/i7jl/5TC8P+Buu//WW2K94g1CmYAAAAAAAAAAAAAAAAAAAAAYmVoAVtg | ||
Z1khR3rgDD9/6gw8dussS2/5oLvU/6rR9P+s1Pr/t9n4/3yy4v5VU2FkAAAAAAAAAAAAAAAAAAAAAAAA | ||
AAAAAAAAAAAAAAAAAAALTJQcTXmq/cXe9v+Rv+3/ZI63/3SZvv90lbT/MnKsggAAAAAAAAAAAAAAAAAA | ||
AAAAAAAAAAAAAAAAAAAAAAAACUGQIBlQlv9MfrH/SHqv/xNEef8MO27/By9c/y5WgIYAAAAAAAAAAAAA | ||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAABI7dg8PQYLGBk2W/wdMjf8PUZH/EUyJ/w04Z/QbOVhPAAAAAAAA | ||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEzJlJxNCgMERT5b3D0uO9xFBfOkUMldpEStGBAAA | ||
AAAAAAAAAA+cQQAPnEEAD5xBAA+cQQAAnEGAAJxBwACcQcAAnEHAAJxBwAGcQcADnEHAA5xB/AOcQfwD | ||
nEH8A5xB/gOcQQ== | ||
</value> | ||
</data> | ||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
Imports System.Threading | ||
Imports mRemoteNG.My | ||
Imports WeifenLuo.WinFormsUI.Docking | ||
Imports mRemoteNG.App.Runtime | ||
Imports System.Runtime.InteropServices | ||
Imports System.Text | ||
Imports System.Windows | ||
Imports mRemoteNG.Tools.ProcessController | ||
|
||
Namespace UI | ||
Namespace Window | ||
Public Class SSHCommands | ||
Inherits Base | ||
#Region "Private Fields" | ||
Private _getSessionsThread As Thread | ||
Private _retrieved As Boolean = False | ||
#End Region | ||
|
||
#Region "Public Methods" | ||
Public Sub New(ByVal panel As DockContent) | ||
WindowType = Type.SSHCommands | ||
DockPnl = panel | ||
InitializeComponent() | ||
End Sub | ||
#End Region | ||
Private Sub SSHCommands_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load | ||
|
||
|
||
End Sub | ||
|
||
Private Sub TextBox1_KeyUp(sender As Object, e As KeyEventArgs) Handles txtSSHCommand.KeyUp | ||
If e.KeyCode = Keys.Enter Then | ||
e.SuppressKeyPress = True | ||
|
||
For Each _connection As mRemoteNG.Connection.Info In mRemoteNG.App.Runtime.ConnectionList | ||
For Each _base As mRemoteNG.Connection.Protocol.Base In _connection.OpenConnections | ||
If _base.InterfaceControl.Info.Protocol = mRemoteNG.Connection.Protocol.Protocols.SSH1 Or _ | ||
_base.InterfaceControl.Info.Protocol = mRemoteNG.Connection.Protocol.Protocols.SSH2 Then | ||
Dim bb As mRemoteNG.Connection.Protocol.SSH2 = _base | ||
Dim line As Integer = txtSSHCommand.GetLineFromCharIndex(txtSSHCommand.SelectionStart) | ||
Dim strLine As String = txtSSHCommand.Lines(line - 1) | ||
|
||
For Each ch As Char In strLine | ||
Dim val As System.Windows.Forms.Keys = DirectCast([Enum].Parse(GetType(Keys), ch.ToString().ToUpper()), Keys) | ||
Win32.SendMessage(bb.PuttyHandle, Win32.WM_KEYDOWN, val, 0) | ||
Next | ||
|
||
Win32.SendMessage(bb.PuttyHandle, Win32.WM_KEYDOWN, Keys.Enter, 0) | ||
|
||
End If | ||
Next | ||
Next | ||
End If | ||
End Sub | ||
|
||
End Class | ||
End Namespace | ||
End Namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters