Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1195 → Rev 1196

/TCPproxy/trunk/AboutForm.Designer.cs
File deleted
\ No newline at end of file
/TCPproxy/trunk/ListenForm.Designer.cs
File deleted
\ No newline at end of file
/TCPproxy/trunk/ListenForm.cs
9,7 → 9,7
 
namespace TCPproxy
{
public partial class ListenForm : Form
public class ListenForm : Form
{
private int listenPort;
private string resendHost;
16,12 → 16,137
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();
}
 
public bool Execute(Form owner,
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)
{
listenPortBox.Text = (listenPort == 0) ? "" : listenPort.ToString();
65,7 → 190,7
return;
}
resendHost = resendHostBox.Text;
 
// parse resend port
try
{
/TCPproxy/trunk/AboutForm.cs
8,13 → 8,156
 
namespace TCPproxy
{
public partial class AboutForm : Form
public class AboutForm : Form
{
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.Label appLabel;
private System.Windows.Forms.Label copyrightLabel;
private System.Windows.Forms.Label license1Label;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.LinkLabel homePageLabel;
private System.Windows.Forms.Label versionLabel;
private System.Windows.Forms.Label license2Label;
private System.Windows.Forms.Label warrantyLabel;
 
#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.appLabel = new System.Windows.Forms.Label();
this.copyrightLabel = new System.Windows.Forms.Label();
this.license1Label = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.homePageLabel = new System.Windows.Forms.LinkLabel();
this.versionLabel = new System.Windows.Forms.Label();
this.license2Label = new System.Windows.Forms.Label();
this.warrantyLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// appLabel
//
this.appLabel.AutoSize = true;
this.appLabel.Font = new System.Drawing.Font("Arial", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.appLabel.Location = new System.Drawing.Point(12, 16);
this.appLabel.Name = "appLabel";
this.appLabel.Size = new System.Drawing.Size(146, 32);
this.appLabel.TabIndex = 0;
this.appLabel.Text = "TCPproxy";
//
// copyrightLabel
//
this.copyrightLabel.AutoSize = true;
this.copyrightLabel.Location = new System.Drawing.Point(32, 60);
this.copyrightLabel.Name = "copyrightLabel";
this.copyrightLabel.Size = new System.Drawing.Size(195, 13);
this.copyrightLabel.TabIndex = 1;
this.copyrightLabel.Text = "Copyright (c) 2005-2006 Anatoli Klassen";
//
// license1Label
//
this.license1Label.AutoSize = true;
this.license1Label.Location = new System.Drawing.Point(32, 108);
this.license1Label.Name = "license1Label";
this.license1Label.Size = new System.Drawing.Size(126, 13);
this.license1Label.TabIndex = 2;
this.license1Label.Text = "\"Public domain\" software";
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(205, 217);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 3;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
//
// homePageLabel
//
this.homePageLabel.AutoSize = true;
this.homePageLabel.Location = new System.Drawing.Point(32, 188);
this.homePageLabel.Name = "homePageLabel";
this.homePageLabel.Size = new System.Drawing.Size(229, 13);
this.homePageLabel.TabIndex = 4;
this.homePageLabel.TabStop = true;
this.homePageLabel.Text = "http://www.26th.net/public/projects/tcpproxy/";
this.homePageLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.homePageLabel_LinkClicked);
//
// versionLabel
//
this.versionLabel.AutoSize = true;
this.versionLabel.Location = new System.Drawing.Point(32, 76);
this.versionLabel.Name = "versionLabel";
this.versionLabel.Size = new System.Drawing.Size(60, 13);
this.versionLabel.TabIndex = 5;
this.versionLabel.Text = "Version 1.0";
//
// license2Label
//
this.license2Label.AutoSize = true;
this.license2Label.Location = new System.Drawing.Point(32, 124);
this.license2Label.Name = "license2Label";
this.license2Label.Size = new System.Drawing.Size(180, 13);
this.license2Label.TabIndex = 6;
this.license2Label.Text = "- you are allowed to use it in any way";
//
// warrantyLabel
//
this.warrantyLabel.AutoSize = true;
this.warrantyLabel.Location = new System.Drawing.Point(32, 156);
this.warrantyLabel.Name = "warrantyLabel";
this.warrantyLabel.Size = new System.Drawing.Size(64, 13);
this.warrantyLabel.TabIndex = 7;
this.warrantyLabel.Text = "No warranty";
//
// AboutForm
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.okButton;
this.ClientSize = new System.Drawing.Size(292, 252);
this.Controls.Add(this.warrantyLabel);
this.Controls.Add(this.license2Label);
this.Controls.Add(this.versionLabel);
this.Controls.Add(this.homePageLabel);
this.Controls.Add(this.okButton);
this.Controls.Add(this.license1Label);
this.Controls.Add(this.copyrightLabel);
this.Controls.Add(this.appLabel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About TCPproxy";
this.ResumeLayout(false);
this.PerformLayout();
 
}
 
#endregion
 
public AboutForm()
{
InitializeComponent();
}
 
protected override void Dispose(bool disposing)
{
if(disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
 
private void homePageLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
homePageLabel.LinkVisited = true;