9,7 → 9,7 |
|
namespace TCPproxy |
{ |
public partial class ListenForm : Form |
public class ListenForm : Form |
{ |
private int listenPort; |
private string resendHost; |
16,11 → 16,136 |
private IPAddress resendIp; |
private int resendPort; |
|
/// <summary> |
/// Required designer variable. |
/// </summary> |
private System.ComponentModel.IContainer components = null; |
private System.Windows.Forms.Button startButton; |
private System.Windows.Forms.Label label2; |
private System.Windows.Forms.Label label1; |
private System.Windows.Forms.TextBox resendPortBox; |
private System.Windows.Forms.TextBox resendHostBox; |
private System.Windows.Forms.TextBox listenPortBox; |
private System.Windows.Forms.Button cancelButton; |
|
#region Windows Form Designer generated code |
|
/// <summary> |
/// Required method for Designer support - do not modify |
/// the contents of this method with the code editor. |
/// </summary> |
private void InitializeComponent() |
{ |
this.startButton = new System.Windows.Forms.Button(); |
this.label2 = new System.Windows.Forms.Label(); |
this.label1 = new System.Windows.Forms.Label(); |
this.resendPortBox = new System.Windows.Forms.TextBox(); |
this.resendHostBox = new System.Windows.Forms.TextBox(); |
this.listenPortBox = new System.Windows.Forms.TextBox(); |
this.cancelButton = new System.Windows.Forms.Button(); |
this.SuspendLayout(); |
// |
// startButton |
// |
this.startButton.Location = new System.Drawing.Point(136, 62); |
this.startButton.Name = "startButton"; |
this.startButton.Size = new System.Drawing.Size(75, 23); |
this.startButton.TabIndex = 12; |
this.startButton.Text = "Listen"; |
this.startButton.Click += new System.EventHandler(this.startButton_Click); |
// |
// label2 |
// |
this.label2.AutoSize = true; |
this.label2.Location = new System.Drawing.Point(12, 35); |
this.label2.Name = "label2"; |
this.label2.Size = new System.Drawing.Size(56, 13); |
this.label2.TabIndex = 10; |
this.label2.Text = "Resend to"; |
// |
// label1 |
// |
this.label1.AutoSize = true; |
this.label1.Location = new System.Drawing.Point(12, 9); |
this.label1.Name = "label1"; |
this.label1.Size = new System.Drawing.Size(71, 13); |
this.label1.TabIndex = 7; |
this.label1.Text = "Listen on port"; |
// |
// resendPortBox |
// |
this.resendPortBox.Location = new System.Drawing.Point(220, 32); |
this.resendPortBox.Name = "resendPortBox"; |
this.resendPortBox.Size = new System.Drawing.Size(72, 20); |
this.resendPortBox.TabIndex = 9; |
// |
// resendHostBox |
// |
this.resendHostBox.Location = new System.Drawing.Point(114, 32); |
this.resendHostBox.Name = "resendHostBox"; |
this.resendHostBox.Size = new System.Drawing.Size(100, 20); |
this.resendHostBox.TabIndex = 8; |
// |
// listenPortBox |
// |
this.listenPortBox.Location = new System.Drawing.Point(114, 6); |
this.listenPortBox.Name = "listenPortBox"; |
this.listenPortBox.Size = new System.Drawing.Size(100, 20); |
this.listenPortBox.TabIndex = 6; |
// |
// cancelButton |
// |
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; |
this.cancelButton.Location = new System.Drawing.Point(217, 62); |
this.cancelButton.Name = "cancelButton"; |
this.cancelButton.Size = new System.Drawing.Size(75, 23); |
this.cancelButton.TabIndex = 13; |
this.cancelButton.Text = "Cancel"; |
this.cancelButton.UseVisualStyleBackColor = true; |
// |
// ListenForm |
// |
this.AcceptButton = this.startButton; |
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
this.CancelButton = this.cancelButton; |
this.ClientSize = new System.Drawing.Size(301, 91); |
this.Controls.Add(this.cancelButton); |
this.Controls.Add(this.startButton); |
this.Controls.Add(this.label2); |
this.Controls.Add(this.label1); |
this.Controls.Add(this.resendPortBox); |
this.Controls.Add(this.resendHostBox); |
this.Controls.Add(this.listenPortBox); |
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; |
this.MaximizeBox = false; |
this.MinimizeBox = false; |
this.Name = "ListenForm"; |
this.ShowIcon = false; |
this.ShowInTaskbar = false; |
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; |
this.Text = "TCPproxy - Start Listening"; |
this.ResumeLayout(false); |
this.PerformLayout(); |
|
} |
|
#endregion |
|
public ListenForm() |
{ |
InitializeComponent(); |
} |
|
protected override void Dispose(bool disposing) |
{ |
if (disposing && (components != null)) |
{ |
components.Dispose(); |
} |
base.Dispose(disposing); |
} |
|
public bool Execute(Form owner, |
ref int listenPort, ref string resendHost, out IPAddress resendIp, ref int resendPort) |
{ |